Additions to selecting repls

Describe your feature request
Additions next to the delete option when selecting multiple repls at once, like moving the repls to a folder or downloading them.
What problem(s) would this feature solve?
It would let users move/download multiple repls at once with ease.
Explain what you were trying to do when you came across the problem leading to this feature request
I wanted to mass download repls,
and in the past I have had to use graphql to move all my 100 days of code repls to a folder.

9 Likes

The URL of https://replit.com/@owner/repl.zip downloads a zip of your repl, but you might be able to use GQL or crosis4furrets even further to get secrets

3 Likes

I’ve wanted this feature on replit since I joined!

3 Likes

(I haven’t heard anything about bulk download though…maybe make a separate topic for that?)

1 Like

you can just use the https://replit.com/@username/repl-name.zip endpoint to download a zip of your repl files (but you might need GQL to get secrets). When paired with a list of all of your repls, then you can effectively create a bulk download alternative.

3 Likes

Maybe someone should make a Chrome extension for this? :thinking:

3 Likes

perhaps, or use GQL to get a list of repls. You know what, I’m going to make one right now.

3 Likes

I already made a script for this in What is taking this space? - #26 by MiloCat.
Just modify it to add a rui icon button to the mass delete repls pop up.
Maybe @luisafk could add this to xl-replit.

3 Likes

Maybe, if i have time.

4 Likes

Python660 made a script that I just tweaked. It has to run in the console instead of being a bookmarklet (probably a security restriction or, simpler, just a bug) but it works well and it accounts for all spaces/unique characters, because it gets the actual link of the Repl instead of taking its name and replacing the characters.

And it isn’t moving Repls (would be harder cuz it’s probably a POST/PUT/PATCH endpoint for that) but it IS downloading and it works:

let popup = document.querySelector(".css-p60fys"); if (! popup){alert("Please select at least 1 repl(s) before using this tool.");} else{let btndiv = popup.children[1].children[0]; console.log(btndiv.children[0].innerHTML); btndiv.innerHTML = `<button onclick='let pickedRepls = []; document.querySelectorAll(".css-ow5df0").forEach(function(e, i){let selected = e.children[0].children[0].children[0].children[0].children[0].children[0].checked; console.log(selected); if (selected){pickedRepls.push(i)}}); console.log(pickedRepls); document.querySelectorAll(".css-1nj74pm")[1].click();setTimeout(function(){document.querySelectorAll(".css-ow5df0").forEach(function(e, i){if (pickedRepls.includes(i)){console.log(e); window.open(e.children[0].href + ".zip")}});},500)' class="replStar css-1nj74pm" type="button" aria-label="Star" style="--height: 24px; --width: 24px;"><img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 -960 960 960' width='16'%3e%3cpath fill='%23FFFFFF' d='M480-313 287-506l43-43 120 120v-371h60v371l120-120 43 43-193 193ZM220-160q-24 0-42-18t-18-42v-143h60v143h520v-143h60v143q0 24-18 42t-42 18H220Z'/%3e%3c/svg%3e"/></button>`}
3 Likes

For the bookmarklet, did you use an IIFE? Like this:

javascript:(()=>{/*code here*/})()

Otherwise, the code is executed in the main scope, so variables and output mess up.

6 Likes

Everything on Replit seems to use Replit’s GraphQL API, and since people have been banned for things related to it, I’d recommend avoiding using it.

7 Likes

I think it’s against ToS, but Replit doesn’t really mind if it’s not malicious.

3 Likes

This is what I usually do, but Python660 didn’t so I just modified the part of the code that wasn’t working. You can contain it if you want.

Edit: tried it and it actually worked but I didn’t see the download icon but the button still worked (not a big issue really)

javascript:(function(){(function(){let popup = document.querySelector(".css-p60fys"); if (! popup){alert("Please select at least 1 repl(s) before using this tool.");} else{let btndiv = popup.children[1].children[0]; console.log(btndiv.children[0].innerHTML); btndiv.innerHTML = `<button onclick='let pickedRepls = []; document.querySelectorAll(".css-ow5df0").forEach(function(e, i){let selected = e.children[0].children[0].children[0].children[0].children[0].children[0].checked; console.log(selected); if (selected){pickedRepls.push(i)}}); console.log(pickedRepls); document.querySelectorAll(".css-1nj74pm")[1].click();setTimeout(function(){document.querySelectorAll(".css-ow5df0").forEach(function(e, i){if (pickedRepls.includes(i)){console.log(e); window.open(e.children[0].href + ".zip")}});},500)' class="replStar css-1nj74pm" type="button" aria-label="Star" style="--height: 24px; --width: 24px;"><img src="data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' height='16' viewBox='0 -960 960 960' width='16'%3e%3cpath fill='%23FFFFFF' d='M480-313 287-506l43-43 120 120v-371h60v371l120-120 43 43-193 193ZM220-160q-24 0-42-18t-18-42v-143h60v143h520v-143h60v143q0 24-18 42t-42 18H220Z'/%3e%3c/svg%3e"/></button>`}})()})()```
3 Likes

FYI: Bulk delete is now rolled out: https://twitter.com/Replit/status/1683531174394642438

5 Likes

When are we going to get bulk move and download? It’s been months and if I recall correctly, you guys said it’d be added really soon.

4 Likes