This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-03-19 08:34:53

wmays
Scratcher
Registered: 2008-05-10
Posts: 500+

Official Userscript Topic

I've noticed that whenever someone creates a userscript, they make a new topic. I think that there are enough people who make them that we should have one topic. So, here's mine...

Code:

// ==UserScript==
// @name           NoHide
// @namespace      Unknown
// @include        http://scratch.mit.edu/forums/*
// ==/UserScript==
var RE1 = new RegExp('<span style="color: invisible">','gi');
var RE2 = new RegExp('<span style="color: #dedfdf">','gi');
var RE3 = new RegExp('<span style="color: gainsboro">','gi');
var TR1 = '<span style="color: black">';
var TR2 = '<span style="color: black">';
var TR3 = '<span style="color: black">';
document.body.innerHTML = document.body.innerHTML.replace(RE1,TR1);
document.body.innerHTML = document.body.innerHTML.replace(RE2,TR2);
document.body.innerHTML = document.body.innerHTML.replace(RE3,TR3);

This will make all "hidden" text black. EDIT: I think I fixed it.


This text is gainsboro.  tongue
This text is #dedfdf.
This is invisible text.

Last edited by wmays (2012-03-19 09:24:18)


http://i42.tinypic.com/2z5vcz9.gif
http://phpscripthost.comoj.com/imagescripts/ipimg.php

Offline

 

#2 2012-03-19 08:43:25

slinger
Scratcher
Registered: 2011-06-21
Posts: 1000+

Re: Official Userscript Topic

Haha, cool! I might make one :3


http://s0.bcbits.com/img/buttons/bandcamp_130x27_blue.png

Offline

 

#3 2012-03-19 10:00:15

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Official Userscript Topic

It's "transparent", not "invisible".  wink
Oh, and who, besides me, has been making these topics?  tongue
And I like full topics for mine. More discussion space.

Offline

 

#4 2012-03-22 14:48:21

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Official Userscript Topic

Does anyone have a good userscript tutorial?

Offline

 

#5 2012-03-22 15:00:37

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Official Userscript Topic

samtwheels wrote:

Does anyone have a good userscript tutorial?

It's just JavaScript with some special stuff at the top. Check out userscripts.org.

Offline

 

#6 2012-03-23 05:46:00

RedRocker227
Scratcher
Registered: 2011-10-26
Posts: 1000+

Re: Official Userscript Topic

Cool ^^

I might download it.


Why

Offline

 

#7 2012-03-23 14:16:23

samtwheels
Scratcher
Registered: 2011-03-20
Posts: 1000+

Re: Official Userscript Topic

I'm making a pointless one that converts underscores in usernames to spaces.

Offline

 

#8 2012-03-24 12:30:47

ImagineIt
Scratcher
Registered: 2011-02-28
Posts: 1000+

Re: Official Userscript Topic

wmays wrote:

I've noticed that whenever someone creates a userscript, they make a new topic. I think that there are enough people who make them that we should have one topic. So, here's mine...

Code:

// ==UserScript==
// @name           NoHide
// @namespace      Unknown
// @include        http://scratch.mit.edu/forums/*
// ==/UserScript==
var RE1 = new RegExp('<span style="color: invisible">','gi');
var RE2 = new RegExp('<span style="color: #dedfdf">','gi');
var RE3 = new RegExp('<span style="color: gainsboro">','gi');
var TR1 = '<span style="color: black">';
var TR2 = '<span style="color: black">';
var TR3 = '<span style="color: black">';
document.body.innerHTML = document.body.innerHTML.replace(RE1,TR1);
document.body.innerHTML = document.body.innerHTML.replace(RE2,TR2);
document.body.innerHTML = document.body.innerHTML.replace(RE3,TR3);

This will make all "hidden" text black. EDIT: I think I fixed it.


This text is gainsboro.  tongue
This text is #dedfdf.
This is invisible text.

Fixed the invisible text.

Offline

 

#9 2012-04-18 15:27:39

scimonster
Community Moderator
Registered: 2010-06-13
Posts: 1000+

Re: Official Userscript Topic

I made an updated version of the hidden text one that also gets invisible text in quotes. :3

Code:

// ==UserScript==
// @name           No hidden text
// @namespace      Scratch Forums
// @description    Show hidden text on the Scratch forums
// @include        http://scratch.mit.edu/forums/*
// ==/UserScript==
var RE1 = new RegExp('<span style="color: transparent">','gi');
var RE2 = new RegExp('<span style="color: #dedfdf">','gi');
var RE3 = new RegExp('<span style="color: gainsboro">','gi');
var RE4 = new RegExp('<span style="color: #f1f1f1">','gi');
var RE5 = new RegExp('<span style="color: lavenderblush">','gi');
var replace = '<span style="color: black">';
document.body.innerHTML = document.body.innerHTML.replace(RE1,replace);
document.body.innerHTML = document.body.innerHTML.replace(RE2,replace);
document.body.innerHTML = document.body.innerHTML.replace(RE3,replace);
document.body.innerHTML = document.body.innerHTML.replace(RE4,replace);
document.body.innerHTML = document.body.innerHTML.replace(RE5,replace);

Offline

 

#10 2012-04-21 12:49:41

3DSfan12345
Scratcher
Registered: 2011-04-02
Posts: 500+

Re: Official Userscript Topic

wmays wrote:

This is invisible text.

Fixed.


R.I.P Scratch 1.4
July 7,2009-May 5,2013

Offline

 

Board footer