getDynamiqueClassName

get permanant changed ClassName

You will need to install an extension such as Tampermonkey, Greasemonkey or Violentmonkey to install this script.

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

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

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

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

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

(I already have a user script manager, let me install it!)

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.

(I already have a user style manager, let me install it!)

// ==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).
*/