MediaWiki:LBSSearch.js

Revision as of 06:54, 16 January 2017 by Jcblmaster (talk | contribs) (Created page with "addOnloadHook(init) function init() { var button = document.getElementById("mainchain"); button.onclick = function(){ mainchainSearch() } } function mainchainSearc...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
addOnloadHook(init)

function init()
{
  var button = document.getElementById("mainchain");
  button.onclick = function(){
    mainchainSearch()
  }
}

function mainchainSearch()
{
  var s4 = document.getElementById("4th");
  var s3 = document.getElementById("3th");
  var s2 = document.getElementById("2th");
  var s1 = document.getElementById("1th");

  var mainchain = ".*" + s4.options[s4.selectedIndex].value + s3.options[s3.selectedIndex].value + s2.options[s2.selectedIndex].value + s1.options[s1.selectedIndex].value + "Cer";
  window.open("http://jcbl.jp/wiki/Volatile:ListMol/LBS?my_1=Mainchain" + mainchain, "_blank");
}