G.E Auto Note Favourites

Fills the notes section with the gallery's tags when favouriting.

Ajankohdalta 6.3.2015. Katso uusin versio.

  1. // ==UserScript==
  2. // @name G.E Auto Note Favourites
  3. // @description Fills the notes section with the gallery's tags when favouriting.
  4. // @author Hen Tie
  5. // @homepage http://hen-tie.tumblr.com/
  6. // @namespace https://greasyfork.org/en/users/8336
  7. // @include http://g.e-hentai.org/gallerypopups.php?gid=*
  8. // @include https://g.e-hentai.org/gallerypopups.php?gid=*
  9. // @include http://exhentai.org/gallerypopups.php?gid=*
  10. // @include https://exhentai.org/gallerypopups.php?gid=*
  11. // @grant GM_getValue
  12. // @grant GM_setValue
  13. // @run-at document-start
  14. // @require http://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js
  15. // @icon https://i.imgur.com/RPv1X1r.png
  16. // @version 1.0
  17. // ==/UserScript==
  18. jQuery(document).ready(function($) {
  19. $('label[for^=fav]').click(function(){
  20. var str = $("#taglist a[id^='ta_female'], #taglist a[id^='ta_parody'], #taglist a[id^='ta_group'], #taglist a[id^='ta_artist'], #taglist a[id^='ta_male'], #taglist a[id^='ta_female'], #taglist td#miscid+td a", window.opener.document).append("\u200B").text();
  21. str = str.replace(/full censorship|mosaic censorship|incomplete|out of order|scanmark|poor grammar/g, '');
  22. str = str.replace(/ /g, '_');
  23. str = str.replace(/\u200B/g, ', ');
  24. str = str.replace(/(, )+/g, ', ');
  25. str = str.substr(0, str.length-2);
  26. $('textarea').val(str)
  27. });
  28. });