likera retroshare

Collects all long form retroshare certifications on the current page for adding all in one shot

Du musst eine Erweiterung wie Tampermonkey, Greasemonkey oder Violentmonkey installieren, um dieses Skript zu installieren.

You will need to install an extension such as Tampermonkey 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.

Sie müssten eine Skript Manager Erweiterung installieren damit sie dieses Skript installieren können

(Ich habe schon ein Skript Manager, Lass mich es installieren!)

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    likera retroshare
// @license MIT
// @version  1
// @grant    none
// @locale https://www.likera.com/
// @description Collects all long form retroshare certifications on the current page for adding all in one shot
// @include  https://www.likera.com/forum/mybb/Thread-RetroShare-certs*
// @run-at  document-end
// @namespace https://greasyfork.org/users/1539629
// ==/UserScript==

var x = document.getElementsByClassName("post_body scaleimages");

var z = 0;

var certs = '';

for(let j = 0; j < x.length; j++){
  var position = x[j].textContent.search("CQEGA");
  //console.log(z);
  z++;
  if(position != -1){ // found something :)
    var parts = x[j].textContent.split('\n\n');
    for (let i = 0; i < parts.length; i++) {
      if(parts[i].search("CQEGA") != -1){
        var cert = parts[i].replace(/\n/g, ''); // remove new lines
        certs += cert + '\n';
      }
    }
  }
}
console.log(certs);