Advertisement
Guest User

Untitled

a guest
Sep 16th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. // ==UserScript==
  2. // @name Fanfiction.net, make text selectable again
  3. // @include http://m.fanfiction.net/*
  4. // @include http://m.fictionpress.com/*
  5. // @include http://www.fanfiction.net/*
  6. // @include http://www.fictionpress.com/*
  7. // @include https://m.fanfiction.net/*
  8. // @include https://m.fictionpress.com/*
  9. // @include https://www.fanfiction.net/*
  10. // @include https://www.fictionpress.com/*
  11. // @require http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js
  12. // @updateURL https://userscripts.org/scripts/source/179482.meta.js
  13. // @downloadURL https://userscripts.org/scripts/source/179482.user.js
  14. // @version 3.5
  15. // @grant GM_addStyle
  16. // ==/UserScript==
  17.  
  18. $(".nocopy").removeClass ("nocopy");
  19.  
  20. setInterval (fixInlineStyles, 999);
  21.  
  22. function fixInlineStyles () {
  23. $("[style*='user-select']").each ( function () {
  24. var jThis = $(this);
  25. var styleAttr = jThis.attr ("style");
  26. styleAttr = styleAttr.replace (/user-select:\s*none/g, "user-select: text");
  27. jThis.attr ("style", styleAttr);
  28. } );
  29.  
  30. unsafeWindow.jQuery(document).unbind ("keydown");
  31. }
  32.  
  33. GM_addStyle ( " \
  34. * { \
  35. -moz-user-select: text !important; \
  36. user-select: text !important; \
  37. -webkit-user-select: text !important; \
  38. } \
  39. " );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement