- // ==UserScript==
- // @name The Nude - Test2 Thumbnail from data-image
- // @namespace janvier
- // @include https://www.thenude.com/*
- // @version 1
- // @grant none
- // ==/UserScript==
- // GOOD 1
- //.bio-list>li> a[data-img^="https://static.thenude.com/models/"]
- $( ".bio-list>li> a[data-img^='https://static.thenude.com/models/']" ).each(function() {
- var attr = $(this).attr('data-img');
- if (typeof attr !== typeof undefined && attr !== false) {
- // 'url('+attr+')' should be "url("+attr+")"
- $(this).css('background-image' , 'url("'+attr+'")' );
- }
- function addCSS () {
- // add CSS
- $('head').append(`
- <style type='text/css'>
- .bio-list>li> a[data-img^='https://static.thenude.com/models/'] {
- display: inline-block !important;
- height: 60px !important;
- width: 42px !important;
- background-repeat: no-repeat !important;
- background-size: contain !important;
- background-position: center !important;
- border: 1px solid red !important;
- }
- </style>
- `)
- console.log('TheNude: CSS added')
- }
- })()
TesThe Nude - Test2 Thumbnail from data-imaget