1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

I need a chrome extension (userscript)

Discussion in 'Hire a Freelancer' started by H41822, Aug 22, 2016.

  1. H41822

    H41822 Newbie

    Joined:
    Apr 25, 2014
    Messages:
    19
    Likes Received:
    1
    I need the following Userscript converted as a google chrome userscript:
    https://greasyfork.org/scripts/11672-gkplugins-helper/code/GkPlugins%20Helper.user.js

    Please keep in mind, that this is not a simple userscript, it needs special rights granted.
    A "advanced coder" would know what i am talking about.

    I am requestion this, because i failed to do it myself.

    Demo Site:
    http://nou4r.net/x/play/play.php?url=https://ok.ru/video/37675534991

    For the beginning, you can install the userscript via Tampermonkey or greasemonkey.
    I will ofcourse you money for your work.

    Code:
        var request = function(reqObj,onCom,onErr){
            var xhttp;
            if (window.XMLHttpRequest) {
                xhttp = new XMLHttpRequest()
            }else{
                xhttp = new ActiveXObject("Microsoft.XMLHTTP")
            }
            xhttp.onreadystatechange = function(){
                if(xhttp.readyState == 4) {
                    if(xhttp.status == 200){
                        if(onCom){onCom(xhttp.responseText)}
                    }else{
                        if(onErr){onErr(reqObj)}
                    }
                }
            }
            var async = true;
            if(reqObj.async!=null){
                async = reqObj.async;
            }
            xhttp.open(reqObj.method, reqObj.url, async);
            if(reqObj.data){
                xhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
                xhttp.send(reqObj.data);
            }else{
                xhttp.send();
            }
        }