Discuss Scratch

-Vuton-
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

I've been working on a little side project that past few days, it's not close to finished, and it has a few bugs, but it's in a good enough position to have a topic created on it.

I'd like to present LinkJect, an automatic link shortener & redirector for Scratch projects (that's mostly in Beta). Linkject is safe, easy to use and forever free (more about they three points on the website).

The probably temporary domain is https://linkject.surge.sh and all other usage info is on the site.

Enjoy!

Last edited by -Vuton- (Feb. 6, 2018 17:52:06)




blueparrot18
Scratcher
100+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

Thanks!

Questions About Scratch or beyond scratch?
Comment on my profile!
Sheep_maker
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

Perhaps it could convert the base 10 project ID to a modification of base 64 to shorten the URL a bit more.

- Sheep_maker This is a kumquat-free signature. :P
Scratch 3.0 blocks but less fat
.postsignature { overflow: auto; } .scratchblocks { overflow-x: auto; overflow-y: hidden; }
-Vuton-
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

Sheep_maker wrote:

Perhaps it could convert the base 10 project ID to a modification of base 64 to shorten the URL a bit more.
That's a good idea, I'll take a look into it.



Wetbikeboy2500
Scratcher
100+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

You can also use Google's goo.gl to shorten links for a Scratch project and really any other website. There is also an api they have to generate new ones.




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/ (25 Supporters)
New Blocks for Displaying Text: https://scratch.mit.edu/discuss/topic/171508 (7 Supporters)
Sprite Folders: https://scratch.mit.edu/discuss/topic/171569/ (7 Supporters)
Find code easier: https://scratch.mit.edu/discuss/topic/144748/ (5 Supporters)
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
herohamp
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

Hmmm you should find a way to compress the project id.

I would suggest using base62 https://www.npmjs.com/package/base62

just use browserify so it works in the browser

this would shorten each project to 5 characters

EDIT:

https://github.com/sasaplus1/base62.js/ seems to be the same

Last edited by herohamp (Feb. 7, 2018 17:53:07)

-Vuton-
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

Wetbikeboy2500 wrote:

You can also use Google's goo.gl to shorten links for a Scratch project and really any other website. There is also an api they have to generate new ones.
Yeah, but I was aiming to make a safer URL shortener, only for scratch, so that users can trust that it doesn't lead them somewhere random.

Last edited by -Vuton- (Feb. 7, 2018 20:01:06)




blueparrot18
Scratcher
100+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

How does this work?

Questions About Scratch or beyond scratch?
Comment on my profile!
herohamp
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

blueparrot18 wrote:

How does this work?
I assume it uses a 404 error page which is programed to take the URL and redirect
-Vuton-
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

herohamp wrote:

blueparrot18 wrote:

How does this work?
I assume it uses a 404 error page which is programed to take the URL and redirect
Yep



Jonathan50
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

Sheep_maker wrote:

Perhaps it could convert the base 10 project ID to a modification of base 64 to shorten the URL a bit more.
If base 36 is good enough you can just go .toString(36) and parseInt(…, 36).

Or you could get the last base-64 digit by bitwise-ANDing the project ID with 63, index the digit into a string of 64 URL-safe characters, then shift the project ID 6 bits left, and do it again and again until the project ID is 0…

Last edited by Jonathan50 (Feb. 8, 2018 01:11:26)

novice27b
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

Sorry to 1-up you, but I didn't think your URLs were short enough, so I made this: ح.tk

Example: ح.tk/ӡ⇇

Edit: fixed URLs?

Last edited by novice27b (Feb. 8, 2018 18:38:21)


Super Hexagon in Scratch! Desktop specs: 2x Intel Xeon X5450 @ 3.0GHz, 32GB DDR2 ECC RAM, GTX 480, 128GB NVMe SSD, Arch Linux / MacOS / Windows 10
RIP dynamic sigs. Both bugs I found have now been patched
-Vuton-
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

novice27b wrote:

Sorry to 1-up you, but I didn't think your URLs were short enough…
I'm currently working with scratchtools to further shorten the URLs. Also:
The probably temporary domain is…
it's not close to finished
link shortener & redirector for Scratch projects (that's mostly in Beta)



novice27b
Scratcher
1000+ posts

LinkJect | An automatic link shortener & redirector for Scratch projects.

-Vuton- wrote:

I'm currently working with scratchtools to further shorten the URLs

You can use the shortening/expansion code from mine if you want: https://github.com/Novice27b/novice27b.github.io/blob/master/lib.js

Super Hexagon in Scratch! Desktop specs: 2x Intel Xeon X5450 @ 3.0GHz, 32GB DDR2 ECC RAM, GTX 480, 128GB NVMe SSD, Arch Linux / MacOS / Windows 10
RIP dynamic sigs. Both bugs I found have now been patched

Powered by DjangoBB

Standard | Mobile