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.
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
I’ve wanted this feature on replit since I joined!
(I haven’t heard anything about bulk download though…maybe make a separate topic for that?)
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.
Maybe someone should make a Chrome extension for this?
perhaps, or use GQL to get a list of repls. You know what, I’m going to make one right now.
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.
Maybe, if i have time.
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>`}
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.
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.
I think it’s against ToS, but Replit doesn’t really mind if it’s not malicious.
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>`}})()})()```