Unova is back

Author Topic: Unova is back  (Read 76202 times)


also could someone give me a link to the userscript that lets you quote posts from locked threads? don't want to butcher posts like this badly again
Code: [Select]
// ==UserScript==
// @name         Locked topic quotes
// @namespace    https://foxscotch.us/
// @version      1.3
// @description  Show quote buttons on locked topics
// @author       Foxscotch
// @match        https://forum.blockland.us/index.php?topic=*
// @grant        none
// ==/UserScript==
 
var mainUrl = 'https://forum.blockland.us/';
var quoteImageUrl = mainUrl + 'Themes/Blockland/images/english/quote.gif';
 
function getStatus() {
    var status = {};
    var statusImages = document.querySelectorAll('.titlebg > td > img');
   
    if (statusImages[statusImages.length - 1].src.includes('locked')) {
        status.locked = true;
    }
    if (statusImages.length > 1) {
        status.poll = true;
        if (statusImages[0].src.includes('locked')) {
            status.pollLocked = true;
        }
    }
   
    return status;
}
var status = getStatus();
 
function getSession() {
    var logout = document.querySelector('img[alt="Logout"]').parentElement;
    return logout.href.split('=')[2];
}
var sessId = getSession();
 
function addTextBox() {
    var container = document.createElement('div');
    container.id = 'locked-topic-container';
   
    var textArea = document.createElement('textarea');
    textArea.id = 'locked-topic-textbox';
   
    var copyButton = document.createElement('button');
    copyButton.id = 'locked-topic-copy';
    copyButton.textContent = "Copy to clipboard";
   
    container.style.margin = 'auto';
    container.style.width = '25%';
   
    textArea.style.display = 'block';
    textArea.style.height = '150px';
    textArea.style.width = "100%";
   
    copyButton.addEventListener('click', function () {
        textArea.select();
        var copied = document.execCommand('copy');
        copied ? console.log('Copied') : console.log('Not copied');
    });
   
    var breaks = document.getElementsByTagName('br');
    breaks[breaks.length - 2].parentElement.insertBefore(container, breaks[breaks.length - 1]);
    container.appendChild(copyButton);
    container.appendChild(textArea);
}
 
function getQuote(link) {
    window.ajax_indicator(1);
    var xhr = new XMLHttpRequest();
    var quote;
 
    xhr.onload = function () {
        xml = xhr.responloveML;
        quote = xml.getElementsByTagName('quote')[0].textContent;
 
        document.getElementById('locked-topic-textbox').value += quote;
 
        window.ajax_indicator(0);
    };
 
    xhr.open('GET', `${mainUrl}index.php?action=quotefast;quote=${link.dataset.messageId};sesc=${sessId};xml`);
    xhr.send();
}
 
function addQuoteButtons() {
    var quoteDestinations = document.querySelectorAll('td[height="20"]:not([width])');
   
    for (var i = 0; i < quoteDestinations.length; i++) {
        var link = document.createElement('a');
        link.href = "#locked-topic-textbox";
       
        var quoteImg = document.createElement('img');
        quoteImg.src = quoteImageUrl;
        quoteImg.alt = 'Reply with quote';
        quoteImg.border = '0';
       
        link.appendChild(quoteImg);
        quoteDestinations[i].appendChild(link);
       
        var msgId = quoteDestinations[i].parentElement.querySelector('div').id.split('_')[1];
        link.dataset.messageId = msgId;
 
        link.addEventListener('click', getQuote.bind(null, link));
    }
}
 
if (status.locked) {
    addTextBox();
    addQuoteButtons();
}
Apologies for the slight pagestretch, I thought I could remember there being a "Spoiler" option on this forum, but I guess it's disabled in Drama.



Hi, I'm Verification's mom. I am deeply offended by his manner of speech and I'm sorry that he ended up being rude to you. I will be sure to whip his ass numerous times tonight. Thanks for emailing me!



Hi, I'm Verification's mom. I am deeply offended by his manner of speech and I'm sorry that he ended up being rude to you. I will be sure to whip his ass numerous times tonight. Thanks for emailing me!

PLOT TWIST


so is he trying to be funny like torin because if so he's failing like the banks during the stock market crash of 1929

so is he trying to be funny like torin because if so he's failing like the banks during the stock market crash of 1929
are you saying this is my sense of humor because i am very insulted

are you saying this is my sense of humor because i am very insulted

no. hell no.

noedit: to clarify
while you are random at times, the jokes you make usually only occur once or twice, or periodically, and they most of the time get a chuckle out of me

unova on the other hand is the equivalent of a broken record: funny at first, annoying after, and then promptly discarded for a new one

if you love getting pegged with aids ridden monday richard so much then why have you not gotten one of the aids ridden black dudes in the local ghetto to give you an std?
this reads like something mike matei would say

this reads like something mike matei would say

brown richards in my ass