Pastebin colored buttons

Some improvements to Pastebin.com, colored buttons etc.

Fra 09.07.2019. Se den seneste versjonen.

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 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         Pastebin colored buttons
// @namespace    https://greatest.deepsurf.us/users/166103
// @version      0.21
// @description  Some improvements to Pastebin.com, colored buttons etc.
// @author       https://github.com/Amarok24
// @match        https://pastebin.com/*
// @grant        none
// ==/UserScript==

(function() {
    'use strict';


var pbButtons = document.querySelectorAll(".buttonsm");

if (pbButtons) {

    var indexOfEditButton = null;

    for (let i = 0; i < pbButtons.length; i++) {
        if (pbButtons[i].innerText == "edit") {
            indexOfEditButton = i;
            break;
        }
    }

    if (indexOfEditButton) {
        console.log("Edit button found, index = " + indexOfEditButton);
        pbButtons[indexOfEditButton].style.backgroundColor = "coral";
        pbButtons[indexOfEditButton].style.fontWeight = 700;
    }

}

})();