Edenya-Script

Addon Edenya

2017-03-07 या दिनांकाला. सर्वात नवीन आवृत्ती पाहा.

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey, Greasemonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey किंवा Violentmonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

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

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला Tampermonkey यासारखे एक्स्टेंशन इंस्टॉल करावे लागेल..

ही स्क्रिप्ट इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्क्रिप्ट व्यवस्थापक एक्स्टेंशन इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्क्रिप्ट व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला Stylus सारखे एक्स्टेंशन इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

ही स्टाईल इंस्टॉल करण्यासाठी तुम्हाला एक युझर स्टाईल व्यवस्थापक इंस्टॉल करावे लागेल.

(माझ्याकडे आधीच युझर स्टाईल व्यवस्थापक आहे, मला इंस्टॉल करू द्या!)

// ==UserScript==
// @name         Edenya-Script
// @namespace    http://tampermonkey.net/
// @version      0.100005
// @description  Addon Edenya
// @author       Valkazaar
// @match        http://www.epershand.net/developpement/javascript-json/greasemonkey-firefox-url-minify-expander
// @grant        none
// @include        http://www.edenya.net/_vahal/*
// @include        https://www.edenya.net/_vahal/*
// ==/UserScript==

(function() {
    'use strict';
    var z = localStorage.getItem('EdenyaColor');
    if (z === null){
        var zz = {'cadre2':'plum'};
        zz['ligneA'] = 'black';
        zz['dialogue'] = 'white';
        zz['narration'] = 'gold';
        zz['cri'] = 'YellowGreen';
        zz['hj'] = 'peachpuff';
        z = localStorage.setItem('EdenyaColor',JSON.stringify(zz));
        z = localStorage.getItem('EdenyaColor');
    }
    z = JSON.parse(z);
    for (var item in z){
         var x = document.getElementsByClassName(item);
        for (var j = 0; j < x.length; j++){
            x[j].style.color = z[item];
        }
    }
    var x = document.getElementsByTagName("font");
    for (var i = 0;i < x.length;i++)
    {
        if(x[i].getAttribute('color')!= null)
           {
           x[i].setAttribute('color',(x[i].getAttribute('color')).replace('#000000','#B09070'));
           x[i].setAttribute('color',(x[i].getAttribute('color')).replace('\\"',''));
           x[i].setAttribute('color',(x[i].getAttribute('color')).replace('\\"',''));
           }
    }
    var x = document.querySelector(".menu");
    if (x != null){
        var y = document.createElement("div");
        var z = localStorage.getItem('EdenyaShortcut');
        if (z === null){
            var zz = {'accueil':'https://www.edenya.net/_vahal/'};
            z = localStorage.setItem('EdenyaShortcut',JSON.stringify(zz));
            z = localStorage.getItem('EdenyaShortcut');
        }
        var zzz= document.createElement("p");
        var zzzz = document.createElement("span");
        
        zzzz.innerHTML = "<a href='#'> Ajouter </a>";
        zzzz.setAttribute("onclick", "var nom=prompt('Nom du shortcut ?');z = localStorage.getItem('EdenyaShortcut');z = JSON.parse(z);z[nom]=document.URL;localStorage.setItem('EdenyaShortcut',JSON.stringify(z));location.href = location.href;");
        zzz.innerText = "Raccourcis : ";
        zzz.appendChild(zzzz);
        y.appendChild(zzz);
        z = JSON.parse(z);
        for(var item in z){
            var zzzz =document.createElement("img");
            zzzz.setAttribute('src','../images/bad.gif');
            zzzz.setAttribute('onclick','z = localStorage.getItem("EdenyaShortcut");z = JSON.parse(z);delete z["'+ item +'"];localStorage.setItem("EdenyaShortcut",JSON.stringify(z));location.href = location.href;');
            var zzz= document.createElement("span");
            var zz = document.createElement("a");
            zz.setAttribute('href',z[item]);
            zz.innerText = item + " ";
            zzz.appendChild(zz);
            zzz.appendChild(zzzz);
            y.appendChild(zzz);    
        }
        y.className = "cadre";
        y.style = "width:200";
        x.appendChild(y);
    }
})();