Namejs on chrome

enter something useful

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         Namejs on chrome
// @namespace    https://greasyfork.org/en/users/28033-expiorer
// @version      0.11
// @description  enter something useful
// @author       You
// @match        http://namejs.jelgava.lv/*
// @grant        none
// ==/UserScript==

function sclPost2( adrese )
{
    //window.location.href=adrese;
    window.open(adrese);
}
function OpenChildWindow(adrese)
{
    //window.location.href=adrese;
    window.open(adrese);
}

    function popupCenter(url, title, w, h) {
      var left = (screen.width/2)-(w/2);
      var top = (screen.height/2)-(h/2);
      return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
    }

function OpenSearchWindow(nosaukums,adrese)
{
    //window.open(adrese);
    //var para = document.getElementById("fraDownload");
    //para.setAttribute("src", adrese);
    //para.setAttribute("width", "100%");
    //para.setAttribute("height", "100%");
    //para.setAttribute("style", "");
    
    var h=600;
    var w=600;
    var left = (screen.width/2)-(w/2);
    var top = (screen.height/2)-(h/2);
    window.open(adrese, nosaukums, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
   
    //var element = document.getElementById("div1");
    //var child = document.getElementById("p1");
    //element.insertBefore(para,child);
    
    //document.getElementById("iframea").src=websel;
}

//addJS_Node (sclPost2);
addJS_Node (OpenChildWindow);//atverot dokumentu
addJS_Node (OpenSearchWindow);//atverot meklētāja logu

function addJS_Node (text, s_URL, funcToRun, runOnLoad) {
    var D                                   = document;
    var scriptNode                          = D.createElement ('script');
    if (runOnLoad) {
        scriptNode.addEventListener ("load", runOnLoad, false);
    }
    scriptNode.type                         = "text/javascript";
    if (text)       scriptNode.textContent  = text;
    if (s_URL)      scriptNode.src          = s_URL;
    if (funcToRun)  scriptNode.textContent  = '(' + funcToRun.toString() + ')()';

    var targ = D.getElementsByTagName ('head')[0] || D.body || D.documentElement;
    targ.appendChild (scriptNode);
}