getDynamiqueClassName

get permanant changed ClassName

K instalaci tototo skriptu si budete muset nainstalovat rozšíření jako Tampermonkey, Greasemonkey nebo Violentmonkey.

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

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Violentmonkey.

K instalaci tohoto skriptu si budete muset nainstalovat rozšíření jako Tampermonkey nebo Userscripts.

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

K instalaci tohoto skriptu si budete muset nainstalovat manažer uživatelských skriptů.

(Už mám manažer uživatelských skriptů, nechte mě ho nainstalovat!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Už mám manažer uživatelských stylů, nechte mě ho nainstalovat!)

// ==UserScript==
// @name         getDynamiqueClassName
// @namespace    http://tampermonkey.net/
// @version      1.1
// @description  get permanant changed ClassName
// @author       MeGa
// @match        YourUrl*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=greasyfork.org
// @grant        God
// ==/UserScript==

var innerHTML = document.body.innerHTML;
var targetFix = "";
var target = innerHTML.indexOf(targetFix);
var begin = target - 90; /*begin classeName aproximatif ---*/
var end = target - 65; /*end classeName approximatif +++*/

var cibleImage = innerHTML.substring(begin, end);

var appo = cibleImage.lastIndexOf('"');
if (appo !== -1) {
    var DecaleLeft = cibleImage.length - appo;
    var newCibleImage = innerHTML.substring(begin, end - DecaleLeft);
    var appoNCI = newCibleImage.indexOf('"');
    if (appoNCI !== -1) {
        var cutBeginToAppo = appoNCI + 1;
        var classImg = innerHTML.substring(begin + cutBeginToAppo, end - DecaleLeft);

    } else {
        var classImg = newCibleImage;
    }
} else {
    var classImg = cibleImage;
}

console.log(classImg);

/*exp:   
<span class="sign-out-link">[ <a rel="nofollow" data-method="delete" href="/fr/users/sign_out">Se déconnecter</a> ]</span>
here: targetFix = "Se déconnecter";
      begin = target -90; /*the differnece between the begining of the class name (taking a margin befor the beginin of 03 positions) 
      end = target -65; the differnece between the end of the class name (taking a margin after the beginin 03 positions).
*/