Discuss Scratch
- Discussion Forums
- » Advanced Topics
- » I made a userscript that replaces every word with Discuss
- 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
- 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 \({https://scratch.mit.edu/discuss/post/6785965/
set [i v] to [0]
}; <(i) < [10]>; {
change [i v] by (1)
}) \{{
think (i) for (1) secs
}} :: control
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.
a bully with a big belly steals your moist cheesy beefmusic 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 +-<>[],.
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
- 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
Nah it was inspired by the script that makes all of the links Discuss did you get this idea from the comment i made earlier? This is great
- rdococ
- Scratcher
500+ posts
I made a userscript that replaces every word with Discuss
I have one word to say about this.
Discuss.
Discuss.
The royal blue colour scheme. Be aesthetic
Links: Search the forums.
Posts: Make cloud variables suck less | Recursive broadcasts | Sprite-local pen
Projects: YaSL tiny LISP with first-class functions & macros | Object-oriented language in Scratch | Complex, split-complex & dual numbers visualized | node logic simulator
- 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.
(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”.
- Discussion Forums
- » Advanced Topics
- » I made a userscript that replaces every word with Discuss