Namejs on chrome

enter something useful

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

You will need to install an extension such as Tampermonkey to install this script.

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 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);
}