Discuss Scratch

NickyNouse
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

// ==UserScript==
// @name         Discuss Discuss
// @version      0.1
// @description  J
// @author       NickyNouse
// @match        *://*/*
// @grant        none
// ==/UserScript==
'use strict';
//from http://stackoverflow.com/a/29301739/1784306
var matchText = function(node, regex, callback, excludeElements) { 
    excludeElements || (excludeElements = ['script', 'style', 'iframe', 'canvas', 'textarea']);
    var child = node.firstChild;
    while (child) {
        switch (child.nodeType) {
        case 1:
            if (excludeElements.indexOf(child.tagName.toLowerCase()) > -1)
                break;
            matchText(child, regex, callback, excludeElements);
            break;
        case 3:
            var bk = 0;
            child.data.replace(regex, function(all) {
                var args = [].slice.call(arguments),
                    offset = args[args.length - 2],
                    newTextNode = child.splitText(offset+bk), tag;
                bk -= child.data.length + all.length;
                newTextNode.data = newTextNode.data.substr(all.length);
                tag = callback.apply(window, [child].concat(args));
                child.parentNode.insertBefore(tag, newTextNode);
                child = newTextNode;
            });
            break;
        }
        child = child.nextSibling;
    }
    return node;
};
matchText(document.body, /\b[A-Za-z]+/g, function(node, match, offset) {
    return document.createTextNode('Discuss');
});

Preview:

Last edited by NickyNouse (July 7, 2017 05:56:27)

__init__
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

Perfect.

thisandagain pls explain
DeleteThisAcount
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

woah



donotforgetmycode
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

It works!

This text under the grey line is my signature. It's not part of my post, but it automatically shows up under all of my posts.

I recommend reading jvvg and Sliverus's essays.

She/her


















Stuff at the bottom of my signature:

for \({
set [i v] to [0]
}; <(i) < [10]>; {
change [i v] by (1)
}) \{{
think (i) for (1) secs
}} :: control
https://scratch.mit.edu/discuss/post/6785965/

Paddle2See wrote:

Would you recommend a confirmation dialog box on that action?
________________________________
| Really send missiles? (Y)es (N)o |
——————————————————

Please forgive my crude mock-up.

By the way - this is rejected for safety reasons.

An0therRand0mC0der wrote:

a bully with a big belly steals your moist cheesy beef
music origins
Be horizontal —
(thanks @thugatwoary and @Za-Chary)
Be high contrast
Generation -1: The first time you see this, copy and paste it on top of your signature in the Scratch forums, and decrease the generation by 1. Social experiment.
i ran out of characters
Kumquat lore
The Scratch Forums support bf +-<>[],.
_3thou_
It seems I can still use assets in my signature. test:
;
Sheep_maker
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

Discuss Discuss Discuss:
Discuss
v v v (Discuss Discuss)
Discuss

- Sheep_maker This is a kumquat-free signature. :P
This is my signature. It appears below all my posts. Discuss it on my profile, not the forums. Here's how to make your own.
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
Blaze349
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

ssucsiD ssucsiD ssucsiD ssucsiD ssucsiD ssucsiD ssucsiD sscsiD ssucsiD ssucsiD ssucsiD ssucsiD ssucsiD ssucsiD ssucsiD ssucsiD 
s
s
u
c
s
i
D
s
s
u
c
s
i
D
s
s
u
c
s
i
D

Last edited by Blaze349 (July 10, 2017 02:23:02)

-penandpaper-
Scratcher
100+ posts

I made a userscript that replaces every word with Discuss

beautiful.

there's no place like index

why do Java programmers wear glasses? because they can't c#
DatOneLefty
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

did you get this idea from the comment i made earlier? This is great


Scratch data available at ScratchDB (Status)

Posts: bf97b44a7fbd33db070f6ade2b7dc549 (btw i use arch)
NickyNouse
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

DatOneLefty wrote:

did you get this idea from the comment i made earlier? This is great
Nah it was inspired by the script that makes all of the links Discuss
__init__
Scratcher
1000+ posts

I made a userscript that replaces every word with Discuss

NickyNouse wrote:

DatOneLefty wrote:

did you get this idea from the comment i made earlier? This is great
Nah it was inspired by the script that makes all of the links Discuss
(Mine)

thisandagain pls explain
1a3c5e7g9i
Scratcher
100+ posts

I made a userscript that replaces every word with Discuss

Discuss discuss discuss discuss-
(just kidding. )
The next thing we need is a userscript that plays all of Spongebob's cane routine in “I ♥︎ Dancing”
every time you click a link that leaves the current page.


Wao how is that possible





Uh Squidward? Yes Spongebob? You might want to look at this… HOLY SHRIMP! If we don't act now, well, think about how many clams I'll have to cough up JUST to see an extra portion of nick.com… or worse, to see ALL of it in general! *** Reader! This is not a fictional sketch! It actually is, but that's not the point. Learn more at the link that Spongebob left at the first instance of “this”.

Powered by DjangoBB