PMBD PMBD
Welcome, Guest. Please login or register.
2024 November 23, 05:15:25

Login with username, password and session length
Search:     Advanced search
138712 Posts in 1637 Topics by 5295 Members
Latest Member: ImaginaryPorkchop
* Home Help Search Calendar Login Register
  Show Posts
Pages: [1]
1  The Pirate Ship / ARR! / Re: Graphical script for the booty site. on: 2020 July 25, 07:07:59
UPDATE: The 1.1 version looks nearly identical on Firefox, so no need to make a specific script edit for it! Just copy and paste the first code in op's labeled "Current Version". If you want the old one, here you go:

Thank you so much. I wanted to say that anyone using Firefox will do this the exact same way, but for anyone who has no idea what they're doing, here's what you copy and paste for Greasemonkey:

Code:
// ==UserScript==
// @name         Sims Paysites Must Be Destroyed View Images
// @version      1.1
// @description  try to take over the world!
// @author       You
// @match        http://paysites.mustbedestroyed.org/*/
// @grant        none
// ==/UserScript==

(function() {
     
    'use strict';

    const anchorClass = "position: relative; text-align: center; display: block; margin-left: auto; margin-right: auto; width: 50%;";

    const imageClass = "max-width:600px; height: auto; display: block; margin: 0 auto;";

    const textClass = "position: absolute; bottom: 10px; left: 50%; transform:translateX(-50%); background-color: black; color: white; padding: 10px 25px; text-align: center;";

    const buttonClass = " background-color: tomato; color: black; padding: 10px 25px; display: inline-block; text-decoration: none; margin: 10px auto 50px auto; text-align: center; display: block; margin-left: auto; margin-right: auto; max-width: 500px;";

    const anchors = document.querySelectorAll('a');
    for(let i = 0; i < anchors.length; i++){

        let type = anchors[i].href.split('.').pop();
        if(['jpeg','png','jpg'].includes(type)){

            let text = anchors[i].href.split('/').pop();


            const src = anchors[i].href;
            anchors[i].outerHTML = `<a style="${anchorClass}" target="_blank" href="${src}"><img style="${imageClass}" src="${src}" alt="Preview"><span style="${textClass}">${text}</span></a>`;
        } else {
            if(type == 'zip' || type == 'rar'){
               let link = anchors[i].href;
               let file = anchors[i].href.split('/').pop();
               anchors[i].outerHTML = `<a style="${buttonClass}" href="${link}">Download ${file}</a>`;
            }
        }

    }
})();
Pages: [1]
Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.063 seconds with 19 queries.