📌 书签脚本:在 ICANN Lookup 页面自动填框并搜索
把下面这行拖到浏览器书签栏(或右键「添加书签」粘贴网址)。然后打开
https://lookup.icann.org,在页面上点该书签,会弹出输入框填域名,自动填入搜索框并触发查询。
javascript:(function(){ var d=prompt('要查询的域名:',(location.hostname||'').replace(/^www\./,'')); if(d===null)return; d=(d||'').trim(); var input=document.querySelector('input[name=lookupStr]')||document.querySelector('.input-domain')||document.querySelector('input[type=text]'); if(!input){alert('未找到搜索框,请在 lookup.icann.org 页面上使用本脚本');return;} var setter=Object.getOwnPropertyDescriptor(window.HTMLInputElement.prototype,'value').set; if(setter)setter.call(input,d);else input.value=d; input.dispatchEvent(new Event('input',{bubbles:true})); input.dispatchEvent(new Event('change',{bubbles:true})); setTimeout(function(){ var btns=document.querySelectorAll('button,[type=submit],a.btn'); var target=null; btns.forEach(function(b){if(!target&&/search|lookup|查询|查询/i.test((b.textContent||'')))target=b;}); if(target)target.click(); else{var f=input.closest('form');if(f&&f.requestSubmit)f.requestSubmit();} },200); })()
拖动小技巧:在 javascript: 开头的链接上按住不放拖到书签栏即可。若被浏览器拦截,复制整行建书签并粘贴为网址保存。