likera retroshare

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

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

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==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);