// ==UserScript== // @name testcase // @namespace http://www.ibdof.com/ // @description Double injection test // @include http://www.ibdof.com/search.php* // @include http://www.ibdof.com/getdaily.php* // ==/UserScript== (function() { /* create a UI selectbox and GO button */ var sdiv = document.createElement('div'); // container sdiv.style.position = 'absolute'; sdiv.style.right = '0px'; sdiv.style.marginRight = '20px'; var sbox = document.createElement('select'); sbox.id = "posturls"; sbox.style.position = 'relative'; sbox.style.top = '-20px'; sbox.style.MozAppearance = "none"; sdiv.appendChild(sbox); var gobtn = document.createElement('button'); gobtn.innerHTML = "Go"; gobtn.style.marginLeft = "2px"; gobtn.style.position = 'relative'; gobtn.style.top = '-17px'; sdiv.appendChild(gobtn); var c = document.getElementsByTagName('form')[0]; // find inject location c.parentNode.insertBefore(sdiv, c); // inject into document c.parentNode.insertBefore(document.createElement("BR"), c); alert("Running"); })();