Discuss Scratch

BookOwl
Scratcher
1000+ posts

Phosphorus Linker User Script

Phosphorus Linker User Script

I have created a userscript that adds a button to the status bar of a Scratch project that has a direct phosphorus link for that project. Follow the instructions here to install it.

Here is a screenshot:


Yes, I know that Mega Scratch User Script has this, but it also has a TON of other stuff, and I just wanted a small, simple way to open projects in Phosphorus, and at 19 lines this fits the bill perfectly. :)

Last edited by BookOwl (Nov. 4, 2015 01:24:51)

BookOwl
Scratcher
1000+ posts

Phosphorus Linker User Script

I can't believe that nobody has posted on this…
MegaApuTurkUltra
Scratcher
1000+ posts

Phosphorus Linker User Script

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
NickyNouse
Scratcher
1000+ posts

Phosphorus Linker User Script

MegaApuTurkUltra wrote:

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
(which will have to be rewritten once the new theme is rolled out sitewide)
BookOwl
Scratcher
1000+ posts

Phosphorus Linker User Script

NickyNouse wrote:

MegaApuTurkUltra wrote:

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
(which will have to be rewritten once the new theme is rolled out sitewide)
This won't - no jquerry in sight! Unless they change the status bar's id
NickyNouse
Scratcher
1000+ posts

Phosphorus Linker User Script

BookOwl wrote:

NickyNouse wrote:

MegaApuTurkUltra wrote:

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
(which will have to be rewritten once the new theme is rolled out sitewide)
This won't - no jquerry in sight! Unless they change the status bar's id
Did they not change any of the element's class/ids/structure or anything? Is it really just a restyle?
Jonathan50
Scratcher
1000+ posts

Phosphorus Linker User Script

NickyNouse wrote:

BookOwl wrote:

NickyNouse wrote:

MegaApuTurkUltra wrote:

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
(which will have to be rewritten once the new theme is rolled out sitewide)
This won't - no jquerry in sight! Unless they change the status bar's id
Did they not change any of the element's class/ids/structure or anything? Is it really just a restyle?
No. They use React (by the Facebook ) now and the structure is rather different. The site no longer displays without Javascript as content is added with Javascript.
Dylan5797
Scratcher
1000+ posts

Phosphorus Linker User Script

lol, disabling it will give you a white page.
comp09
Scratcher
1000+ posts

Phosphorus Linker User Script

Dylan5797 wrote:

lol, disabling it will give you a white page.
Sounds like an accessibility nightmare. Paging @thisandagain…
Dylan5797
Scratcher
1000+ posts

Phosphorus Linker User Script

comp09 wrote:

Dylan5797 wrote:

lol, disabling it will give you a white page.
Sounds like an accessibility nightmare. Paging @thisandagain…
Umm… I'd like something like what they do on StackOverflow where they tell you to enable JavaScript or else…

Last edited by Dylan5797 (Nov. 4, 2015 02:52:15)

MegaApuTurkUltra
Scratcher
1000+ posts

Phosphorus Linker User Script

Dylan5797 wrote:

comp09 wrote:

Dylan5797 wrote:

lol, disabling it will give you a white page.
Sounds like an accessibility nightmare. Paging @thisandagain…
Umm… I'd like something like what they do on StackOverflow where they tell you to enable JavaScript or else…
^

All my sites have like
<noscript style="position:absolute;top:0px;left:0px;width:100%;height:100%"><h1>Enable Javascript to use this site</h1></noscript>

Really I'm not sure why people use script blockers these days. If you want to prevent ads and tracking, get ublock (origin!)

Last edited by MegaApuTurkUltra (Nov. 4, 2015 03:40:16)

comp09
Scratcher
1000+ posts

Phosphorus Linker User Script

MegaApuTurkUltra wrote:

<noscript style="position:absolute;top:0px;left:0px;width:100%;height:100%"><h1>Enable Javascript to use this site</h1></noscript>
That looks like a SEO disaster to me…
MegaApuTurkUltra
Scratcher
1000+ posts

Phosphorus Linker User Script

comp09 wrote:

MegaApuTurkUltra wrote:

<noscript style="position:absolute;top:0px;left:0px;width:100%;height:100%"><h1>Enable Javascript to use this site</h1></noscript>
That looks like a SEO disaster to me…
Lol just use server scripts to detect spiders and remove the noscript
comp09
Scratcher
1000+ posts

Phosphorus Linker User Script

MegaApuTurkUltra wrote:

comp09 wrote:

MegaApuTurkUltra wrote:

<noscript style="position:absolute;top:0px;left:0px;width:100%;height:100%"><h1>Enable Javascript to use this site</h1></noscript>
That looks like a SEO disaster to me…
Lol just use server scripts to detect spiders and remove the noscript
Yeah, to Google elements with styling like that look “sketchy” (because they are used in SEO gaming) which hurts your rankings.
Jonathan50
Scratcher
1000+ posts

Phosphorus Linker User Script

MegaApuTurkUltra wrote:

Dylan5797 wrote:

-snip-
^

All my sites have like
<noscript style="position:absolute;top:0px;left:0px;width:100%;height:100%"><h1>Enable Javascript to use this site</h1></noscript>

Really I'm not sure why people use script blockers these days. If you want to prevent ads and tracking, get ublock (origin!)
+1
but script blockers may not show <noscript> tags
Another way would be a something like this:
<div class="noscript" style="position:absolute;top: 0px; left: 0px; width: 100%; height: 100%;">
    <h1>Enable Javascript to use this site</h1>
</div>
<script>
document.onload = function () {
    var noScripts = document.querySelectorAll(".noscript");
    for(var i = 0; i < noScripts.length; i++)
        noScripts[i].parentNode.removeChild(noScripts[i]);
}
</script>
NickyNouse
Scratcher
1000+ posts

Phosphorus Linker User Script

Jonathan50 wrote:

NickyNouse wrote:

BookOwl wrote:

NickyNouse wrote:

MegaApuTurkUltra wrote:

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
(which will have to be rewritten once the new theme is rolled out sitewide)
This won't - no jquerry in sight! Unless they change the status bar's id
Did they not change any of the element's class/ids/structure or anything? Is it really just a restyle?
No. They use React (by the Facebook ) now and the structure is rather different. The site no longer displays without Javascript as content is added with Javascript.

Dylan5797 wrote:

lol, disabling it will give you a white page.
So… userscripts won't work at all without extensive use of, like, observers (or timers). That's so good. *dies*

Last edited by NickyNouse (Nov. 5, 2015 00:24:00)

Dylan5797
Scratcher
1000+ posts

Phosphorus Linker User Script

Like Jonathan50 said, they count have a “Enable JavaScript” banner on the original page, then have JavaScript remove it.

Last edited by Dylan5797 (Nov. 4, 2015 15:05:20)

ChocolatePi
Scratcher
1000+ posts

Phosphorus Linker User Script

Jonathan50 wrote:

NickyNouse wrote:

BookOwl wrote:

NickyNouse wrote:

MegaApuTurkUltra wrote:

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
(which will have to be rewritten once the new theme is rolled out sitewide)
This won't - no jquerry in sight! Unless they change the status bar's id
Did they not change any of the element's class/ids/structure or anything? Is it really just a restyle?
No. They use React (by the Facebook ) now and the structure is rather different. The site no longer displays without Javascript as content is added with Javascript.
hey, no need for the rickroll. it's doesn't even make sense here!
NickyNouse
Scratcher
1000+ posts

Phosphorus Linker User Script

NickyNouse wrote:

Jonathan50 wrote:

NickyNouse wrote:

BookOwl wrote:

NickyNouse wrote:

MegaApuTurkUltra wrote:

BookOwl wrote:

I can't believe that nobody has posted on this…
I saw this thread earlier but I didn't really have a response. I use MSU
(which will have to be rewritten once the new theme is rolled out sitewide)
This won't - no jquerry in sight! Unless they change the status bar's id
Did they not change any of the element's class/ids/structure or anything? Is it really just a restyle?
No. They use React (by the Facebook ) now and the structure is rather different. The site no longer displays without Javascript as content is added with Javascript.

Dylan5797 wrote:

lol, disabling it will give you a white page.
So… userscripts won't work at all without extensive use of, like, observers (or timers). That's so good. *dies*
Good news guys, I've been playing with the homepage and normal userscripts still seem to run after the page loads (I was thiiiis close to writing a guide to MutationObservers too)
hiccup01
Scratcher
100+ posts

Phosphorus Linker User Script

Tried on Tampermonkey for chrome, didn't work, not sure what went wrong.

Powered by DjangoBB