1. // ==UserScript==
  2. // @name The Nude - Test2 Thumbnail from data-image
  3. // @namespace janvier
  4. // @include https://www.thenude.com/*
  5. // @version 1
  6. // @grant none
  7. // ==/UserScript==
  8. // GOOD 1
  9. //.bio-list>li> a[data-img^="https://static.thenude.com/models/"]
  10. $( ".bio-list>li> a[data-img^='https://static.thenude.com/models/']" ).each(function() {
  11. var attr = $(this).attr('data-img');
  12. if (typeof attr !== typeof undefined && attr !== false) {
  13. // 'url('+attr+')' should be "url("+attr+")"
  14. $(this).css('background-image' , 'url("'+attr+'")' );
  15. }
  16. function addCSS () {
  17. // add CSS
  18. $('head').append(`
  19. <style type='text/css'>
  20. .bio-list>li> a[data-img^='https://static.thenude.com/models/'] {
  21. display: inline-block !important;
  22. height: 60px !important;
  23. width: 42px !important;
  24. background-repeat: no-repeat !important;
  25. background-size: contain !important;
  26. background-position: center !important;
  27. border: 1px solid red !important;
  28. }
  29. </style>
  30. `)
  31. console.log('TheNude: CSS added')
  32. }
  33. })()

TesThe Nude - Test2 Thumbnail from data-imaget