Advertisement
Guest User

Untitled

a guest
Jun 12th, 2014
390
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @id             maturify@scriptish
  3. // @name           mlpchan mature already dammit
  4. // @version        1.0
  5. // @namespace      
  6. // @author        
  7. // @description    
  8. // @include        https://mlpchan.net/anon/*
  9. // @run-at         document-end
  10. // ==/UserScript==
  11.  
  12. function contentEval(source) {
  13.   // Check for function input.
  14.   if ('function' == typeof source) {
  15.     // Execute this function with no arguments, by adding parentheses.
  16.     // One set around the function, required for valid syntax, and a
  17.     // second empty set calls the surrounded function.
  18.     source = '(' + source + ')();'
  19.   }
  20.  
  21.   // Create a script node holding this  source code.
  22.   var script = document.createElement('script');
  23.   script.setAttribute("type", "application/javascript");
  24.   script.textContent = source;
  25.  
  26.   // Insert the script node into the page, so it will run, and immediately
  27.   // remove it to clean up.
  28.   document.body.appendChild(script);
  29.   document.body.removeChild(script);
  30. }
  31.  
  32. function settings() {
  33.     var setSetting = window.settings.setSetting;
  34.     setSetting("show_mature",true,true);
  35.     setSetting("mature_as_spoiler",false,true);
  36.     setSetting("preview_hover",false,true);
  37.     setSetting("image_hover_enabled",false,true);
  38. }
  39.  
  40. contentEval(settings);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement