Discuss Scratch

ItchyCatIII
Scratcher
500+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

When I say former glory, I mean before July 5th when there was a link to the discussion forums instead of a link to the tips page .

The tips page can be very helpful for learning Scratchers, however, for some of us, seeing the Scratch website not the way we're used to is a cause of anxiety (which may be unfortunate when Scratch 3.0 comes out ). Furthermore, many users are active in the forums and/or don't need the tutorials.

Therefore, I have created a Google Chrome extension (sorry, non-Chrome users ) that can restore the navigation bar's former beauty. If you are interested and use Google Chrome (I would have made a userscript but I have no clue how (honestly I don't really know how to make Chrome extensions either, but I wanted to learn that more than I wanted to learn userscripts)), please download the extension [Removed].

If you want, you can access the tips page under the “support” column of the footer on the Scratch homepage or any other Scratch subdomain that uses the new, lighter blue navigation bar (as opposed to the darker blue one that the forums, profiles, projects, etc. use).

If you're curious, worried about personal information, etc., here's the code:
var links = document.getElementsByTagName("li"); // Gets all "li" elements, including the tips button
for (var i = 0;i<links.length;i++) {
if (String(links[i].innerHTML).valueOf() === '<a href="/tips"><span>Tips</span></a>'.valueOf()) { // If the HTML of an li element matches the HTML of the li element for the tips button on the new nav bar...
links[i].innerHTML = '<a href="/discuss"><span>Discuss</span></a>'; // change that li element's HTML to the HTML for an li element of a button that leads to the discussion forums.
};
if (String(links[i].innerHTML).valueOf() === '<a href="/tips">Tips</a>'.valueOf()) {
links[i].innerHTML = '<a href="/discuss">Discuss</a>' // It works for pages still with the old nav bar too.
}
}

Enjoy, I suppose !

Last edited by Harakou (Aug. 10, 2019 19:45:26)


Don't you just hate when people advertise in their signatures (and raisin cookies that look like chocolate chip ones. That's just not okay).

#BringItBack
KawaiiCatGirl-
Scratcher
1000+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

yay!!!! thanks!!!

I have moved to m1mikyu, please comment there if you need assistance!
MegaApuTurkUltra
Scratcher
1000+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

init's is better

$(".box-head")[0].textContent = "committing AT crimes since $whenever"
Blaze349
Scratcher
1000+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

MegaApuTurkUltra wrote:

init's is better
true
zuwel
Scratcher
500+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

I just finished creating a chrome extension that automatically adds the discuss buttons back to where they used to be. It works for both old and new style pages and should work right after install. The extension should be published on the chrome web store later today if I get around to it.

ItchyCatIII
Scratcher
500+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

zuwel wrote:

I just finished creating a chrome extension that automatically adds the discuss buttons back to where they used to be. It works for both old and new style pages and should work right after install. The extension should be published on the chrome web store later today if I get around to it.

Cool! I would've added mine to the Chrome Web Store, but apparently they charge a developer fee because I didn't make a developer account before 2010, and I didn't think it was worth the money when there were so many userscripts already made (I honestly just wanted to practice JavaScript and I figured this would be simple but still something I would actually use).

I find it kind of funny, though, that the Scratch Team removed the discussion link three days ago and there are already ten userscripts/extensions to put it back .

MegaApuTurkUltra wrote:

init's is better

lol the Scratch Team took away the discussion forums link, and people's first reaction is to not only put it back but take away every other link .

Don't you just hate when people advertise in their signatures (and raisin cookies that look like chocolate chip ones. That's just not okay).

#BringItBack
P110
Scratcher
1000+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

I was actually kinda annoyed to see that the discussion link had been removed, tips are great but they should be shown to all new scratchers and not all (like the welcoming committeee)… although it is nice to learn new things at any point down the line

#bringItBack!!
Xx_DeathPetal_xX
Scratcher
100+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

MegaApuTurkUltra wrote:

init's is better
You should be a bit more respectful in replies, it's rude to just say that. It's like implying this:

Yours sucks init is better than you
or like this:
Only init can make it

Consider rephrasing your statements in the future to avoid sounding rude, thanks. Also, awesome ItchyCatIII, I didn't know you could do that kind of coding!

something was here and now it's not
chexbox
Scratcher
100+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

They definitely should just make the navigation bar customizable in the users account settings, but great job with the chrome extension!

Last edited by chexbox (Oct. 29, 2017 20:28:52)


Scratch-Adventures
Scratcher
24 posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

It's also possible to copy the code into a userscript extension, and have it work on other browsers. I used tampermonkey on Opera, and it works perfectly fine. All I had to do was adjust some settings in the userscript part.:
// ==UserScript==
// @name         #BringItBack
// @namespace    https://scratch.mit.edu/
// @version      0.1
// @description  #BringItBack
// @author       You
// @match        *://scratch.mit.edu/*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    var links = document.getElementsByTagName("li"); // Gets all "li" elements, including the tips button
    for (var i = 0;i<links.length;i++) {
        if (String(links[i].innerHTML).valueOf() === '<a href="/tips"><span>Tips</span></a>'.valueOf()) { // If the HTML of an li element matches the HTML of the li element for the tips button on the new nav bar...
            links[i].innerHTML = '<a href="/discuss"><span>Discuss</span></a>'; // change that li element's HTML to the HTML for an li element of a button that leads to the discussion forums.
        }
        if (String(links[i].innerHTML).valueOf() === '<a href="/tips">Tips</a>'.valueOf()) {
            links[i].innerHTML = '<a href="/discuss">Discuss</a>'; // It works for pages still with the old nav bar too.
        }
    }
})();


Whoops! Only “Scratchers” can post images to the discussion forums. To learn more about becoming a “Scratcher” please visit the FAQ.
NitroCipher
Scratcher
500+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

I have a userscript that I made with another user that adds this stuff and more https://github.com/Wetbikeboy2500/ScratchFixer

I hope my post helped you in some way! Post count: 500+

Current project: [s3Blocks: scratchblocks rewritten for Scratch 3.0] ::#4b4a60 //https://scratch.mit.edu/discuss/topic/290031/ Basically done!
This is my signature identifier “aWFtbml0cm9jaXBoZXI=”
ItchyCatIII
Scratcher
500+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

Xx_DeathPetal_xX wrote:

Awesome ItchyCatIII, I didn't know you could do that kind of coding!

I can't . I just wanted to see if I could do something in JavaScript and I had to look up every command that I needed (and then used the HTML of the navigation bar to find and change the bar in the JavaScript).

chexbox wrote:

They definitely should just make the navigation bar customizable in the users account settings, but great job with the chrome extension!

Yeah, that would be nice . Thanks!

Scratch-Adventures wrote:

It's also possible to copy the code into a userscript extension, and have it work on other browsers. I used tampermonkey on Opera, and it works perfectly fine. All I had to do was adjust some settings in the userscript part.:
// ==UserScript==
// @name         #BringItBack
// @namespace    https://scratch.mit.edu/
// @version      0.1
// @description  #BringItBack
// @author       You
// @match        *://scratch.mit.edu/*
// @grant        none
// ==/UserScript==
(function() {
    'use strict';
    var links = document.getElementsByTagName("li"); // Gets all "li" elements, including the tips button
    for (var i = 0;i<links.length;i++) {
        if (String(links[i].innerHTML).valueOf() === '<a href="/tips"><span>Tips</span></a>'.valueOf()) { // If the HTML of an li element matches the HTML of the li element for the tips button on the new nav bar...
            links[i].innerHTML = '<a href="/discuss"><span>Discuss</span></a>'; // change that li element's HTML to the HTML for an li element of a button that leads to the discussion forums.
        }
        if (String(links[i].innerHTML).valueOf() === '<a href="/tips">Tips</a>'.valueOf()) {
            links[i].innerHTML = '<a href="/discuss">Discuss</a>'; // It works for pages still with the old nav bar too.
        }
    }
})();

Oh, cool! I guess it's just a JavaScript code so a userscript should be able to process it. Thanks for noticing that!

NitroCipher wrote:

I have a userscript that I made with another user that adds this stuff and more https://github.com/Wetbikeboy2500/ScratchFixer

Oh, nice job! What else does it add? I don't have Tampermonkey so I can't install userscripts.

Don't you just hate when people advertise in their signatures (and raisin cookies that look like chocolate chip ones. That's just not okay).

#BringItBack
Wetbikeboy2500
Scratcher
100+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

ItchyCatIII wrote:

NitroCipher wrote:

I have a userscript that I made with another user that adds this stuff and more https://github.com/Wetbikeboy2500/ScratchFixer

Oh, nice job! What else does it add? I don't have Tampermonkey so I can't install userscripts.
You can go here to see the forum post which has all the info.




Scratch Made In JavaScript: https://scratch.mit.edu/discuss/topic/171842
Scratch Browser: https://scratch.mit.edu/discuss/topic/285957/
SB2Downloader: https://scratch.mit.edu/discuss/topic/295425/
Multiple work stations: https://scratch.mit.edu/discuss/topic/122484/
New Blocks for Displaying Text: https://scratch.mit.edu/discuss/topic/171508
Sprite Folders: https://scratch.mit.edu/discuss/topic/171569/
Find code easier: https://scratch.mit.edu/discuss/topic/144748/
A Support Button or No support Button: https://scratch.mit.edu/discuss/topic/181154/
I want Scratch grow and become a better place for everyone to come and use. So Scratch needs to expand and have more options for everyone.Scratch needs to break the boundaries and not be trapped by what is familiar to Scratch community
jamisonthornton
Scratcher
4 posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

Cool!
15-MinuteGaming
Scratcher
100+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

Browser extensions are not allowed.

My kumquats and forum signatures ate each other. Luckily, I did not like any of them anyways.
The evil kumquat must have some relation with thanos cat. Evil kumquat is 2.0 and thanos cat is 3.0
April 1st is this Saturday. Details here.
ItchyCatIII
Scratcher
500+ posts

#BringItBack - A Chrome Extension to Return the Navigation Bar to its Former Glory

15-MinuteGaming wrote:

Browser extensions are not allowed.

And this doesn't work anymore anyway . This thread was made before the new rule, and I haven't really thought about it since (and this was a necropost), but you're right, it's now against the rules. I'll remove the link to the download and close this thread. I guess I do need a new signature now, though….

Don't you just hate when people advertise in their signatures (and raisin cookies that look like chocolate chip ones. That's just not okay).

#BringItBack

Powered by DjangoBB

Standard | Mobile