Discuss Scratch

portalpower
Scratcher
1000+ posts

Internet Extenstion

ajskateboarder wrote:

Roblox888i wrote:

Discription
“Some blocks to interact with the browser”

BLOCKS:
(current URL) // Has a checkbox next to it.

(page title) // tells you the current page title and checkbox next to it

< field [name] exists in current URL? :: extension
These aren't useful since they will just report information that is already easily available

Yeah, ST doesn't like to implement constants as variables like for this reason. They're just unnecessary because of how easy to workaround they are. You literally just need one block. The pi block used to be on TOLORS for that reason.

Also, for the <can display notifications> block, I'm not exactly sure how it works, and I'm sure other people wouldn't really know either. It's also harder to figure it out since it's a boolean.

That leaves the copy to clipboard block. While I could see some use cases for this, you can't make an extension out of a single block. Given how useless and confusing the other blocks are, it's probably just best to implement that block in a different extension.
EngineerRunner
Scratcher
1000+ posts

Internet Extenstion

_TotallyNotAnApple_ wrote:

Also, devices have a limited amount of storage.
yeah, i already have an 159gb downloads folder and an 185gb documents folder
k7e
Scratcher
1000+ posts

Internet Extenstion

What would be the point of the “can display notifications?” block if you can't even have notifications with Scratch?

Also, the only point I see in the “Current URL” block is to disable remixing.
bambiFNF6942-
Scratcher
2 posts

Internet Extenstion

Roblox888i wrote:

Discription
“Some blocks to interact with the browser”

BLOCKS:
(current URL) // Has a checkbox next to it.

(page title) // tells you the current page title and checkbox next to it

< field [name] exists in current URL? :: extension

copy [text] to clipboard :: extension

< can display notifications? :: extension
There's already one on turbowarp.org.
Zydrolic
Scratcher
1000+ posts

Internet Extenstion

bambiFNF6942- wrote:

(#64)
There's already one on turbowarp.org.
thats a scratch mod
ajskateboarder
Scratcher
1000+ posts

Internet Extenstion

Roblox888i wrote:

portalpower wrote:

Allows malware to be created on scratch
Maybe if someone is using the extension, below the notes and creits box, it could say “This project is using the browser extension, please be safe!”
?? What does the extension have to do with being able to make malware on Scratch?
ManOfCaps
Scratcher
93 posts

Internet Extenstion

ajskateboarder wrote:

(#66)
?? What does the extension have to do with being able to make malware on Scratch?
the suggestion used to include “open (url)” as a block
ajskateboarder
Scratcher
1000+ posts

Internet Extenstion

ManOfCaps wrote:

ajskateboarder wrote:

(#66)
?? What does the extension have to do with being able to make malware on Scratch?
the suggestion used to include “open (url)” as a block
Yeah, but why do we need a warning, and based on the wording:
This project is using the browser extension, please be safe!
I'm also confused on who is supposed to see the warning. Projects can't use a browser extension, only users can
56-s
Scratcher
500+ posts

Internet Extenstion

-InsanityGames- wrote:

Roblox888i wrote:

(#1)
copy [text] to clipboard :: extension
This is most likely a dupe. Either way, it's still a bad idea since it could lead to browser exploits and other things. You can, however, use Snap! with a custom JavaScript function if you really want. Just ensure you enable JavaScript first.

Here's the code:
const el = document.createElement('textarea');
el.value = x;
document.body.appendChild(el);
el.select();
document.execCommand('copy');
document.body.removeChild(el);
How do you get the js block?
Roblox888i
Scratcher
1000+ posts

Internet Extenstion

bump, read post now, also alert and can display notfication is gone
glitcX
Scratcher
1000+ posts

Internet Extenstion

Roblox888i wrote:

glitcX wrote:

No support, could get really annoying and spammy
How?
open url /sftlr
cake__5
Scratcher
100+ posts

Internet Extenstion

Roblox888i wrote:

current URL :: extension reporter // Has a checkbox next to it

cake__5 wrote:

cake__5 wrote:

- turbowarp detectors easier
- piracy detection (refuse to load game if not on scratch)
- all the good stuff! :D
bump
Maltion
Scratcher
100+ posts

Internet Extenstion

I support this. I'll assume the URL thing would be helpful to detect remixes. In the meantime, i'll show how to do this with the current tools we have today.
The only method to do this is using cloud variables and a external server, with scratchattach (python required)


Step 1: Get scratchattach
Type this in the terminal (cmd): pip install scratchattach


Step 2: Do the server side code
Open your favorite integrated development environment and write the following python code. Notepad is valid.

Python wrote:

import scratchattach as sa
import random
import time

session = sa.login(“enter your scratcher account username here”, “enter your scratch password here”)
cloud = session.connect_scratch_cloud(“enter the original project id here”)

while True:
cloud.set_var(“Value”, random.randint(0,300))
time.sleep(1)
Make sure to replace the username, password and project id by real ones. After this, save this file as __main__.py and run it on a place where you know it will always run, for example, a hosted server.


Step 3: Do the client side code.

when green flag clicked
reset timer
forever
if <not <(☁ Value) = (Last value)>> then
reset timer
set [Last value] to (☁ Value)
end
if <(timer) > [10]> then
do something
end
end

After doing all of this, you will have a working remix detector which will be useful to display credit in remixes. The cloud variable will only get updated in the original project and remixes will not get updated by the server, allowing the script to detect it is a remix. I'm not sure if it works with New Scratchers. Please note that using this method to completely disable remixes is against the community guidelines so only use it to ensure credit.

I know this is very inconvenient to do, but it's the best way we have right now. You might also want to add an internet connection detector to prevent this from activating if the internet stops working.

Last edited by Maltion (Yesterday 23:45:10)

Powered by DjangoBB