Got an iPhone or iPad? We have a brand new Pastebin App for both devices, and it's totally free! Click here to download the new Pastebin App for iOS.
Guest

JoeSimmons

By: a guest on May 26th, 2009  |  syntax: JavaScript  |  size: 0.90 KB  |  hits: 74  |  expires: Never
download  |  raw  |  embed  |  report abuse
Copied
  1. // ==UserScript==
  2. // @name           UserScripts.org - New Script in Dropdown And Mainpage
  3. // @namespace      http://mailerdaemon.home.comcast.net
  4. // @description    Adds a "New Script" option to the user dropdown and mainpage on UserScripts.org
  5. // @include        http://userscripts.org/*
  6. // ==/UserScript==
  7.  
  8. if(hm=document.getElementById("homeMenu")) {
  9.         var li = document.createElement("li"),
  10.                 a = document.createElement('a');
  11.         a.setAttribute('href', '/scripts/new');
  12.         a.textContent = 'new script';
  13.         li.appendChild(a);
  14.         hm.appendChild(li);
  15. }
  16. if(window.location.href=='http://userscripts.org/' && (ul=document.evaluate("./div/ul",document.getElementById('content'),null,9,null).singleNodeValue)) {
  17.         var li = document.createElement("li"),
  18.                 a = document.createElement('a');
  19.         a.setAttribute('href', '/scripts/new');
  20.         a.textContent = 'Create New Script';
  21.         li.appendChild(a);
  22.         ul.appendChild(li);
  23. }