inherit
123128
0
Feb 3, 2020 13:53:38 GMT -8
Malagrond
Remember, remember the 5th of November.
813
April 2008
malagrond
|
Post by Malagrond on Jun 9, 2009 15:55:24 GMT -8
Description: Creates an editable drop-down box in the Quick Reply table, allowing users to insert images into their post. Preview: ClickGlobal Footer <script> <!-- /* Insert Images Dropdown in Quick Reply by Malagrond */
// Don't edit these lines. var j=0; var ddb = document.createElement("select"); ddb.options[j++] = new Option("Select an Image", "", true, false);
// DO add options here. Always put false as the last two arguments. ddb.options[j++] = new Option("Image Name", "ImageURL", false, false); ddb.options[j++] = new Option("Image Name #2", "ImageURL2", false, false);
// No need to edit below. if(location.href.match(/board=/gi) && location.href.match(/action=display/gi) && location.href.match(/thread=/gi)){ var allTds = document.getElementsByTagName("td"); var i=0; for(var i=0;i<allTds.length;i++){ if(allTds[i].className.match(/titlebg/gi) && allTds[i].innerHTML.match(/Quick Reply/gi)){ i+=1; allTds[i].insertBefore(ddb, allTds[i].firstChild.nextSibling); } } ddb.onchange = function(){if(ddb.options[ddb.selectedIndex].value!=""){document.getElementsByName("message")[0].value+="["+"img"+"]"+ddb.options[ddb.selectedIndex].value+"["+"/"+"img"+"]";}} } --> </script>
~Mala
|
|