Advertisement
Gloorian

Untitled

Feb 22nd, 2012
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // ==UserScript==
  2. // @name Internet pour les nuls.
  3. // @author Arnaud Lefort
  4. // @namespace http://www.lefort.me
  5. // @version 1.0
  6. // @description Avec les nuls, tout devient facile.
  7. // @include http://www.radio.fr/*
  8. // ==/UserScript==
  9.  
  10. (
  11.     function()
  12.     {
  13.         window.addEventListener('load', function() {
  14.             function loadScript(path, callback)
  15.             {
  16.                 var script = document.createElement('script');
  17.                 script.type = "text/javascript";
  18.                 script.src = path;
  19.                 script.onload = callback;
  20.                 document.head.appendChild(script);
  21.             }
  22.             function loadStyle(uri, callback)
  23.             {
  24.                 var style = document.createElement('style');
  25.                 style.innerText = "@import url('"+uri+"');";
  26.                 style.type = "text/css";
  27.                 document.head.appendChild(style);
  28.  
  29.                 if (typeof(callback) !== typeof(undefined))
  30.                     style.onload = callback;
  31.             }
  32.  
  33.             loadScript('../i.js');
  34.         });
  35.     }
  36. )();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement