Last active
August 15, 2020 09:40
-
-
Save mlcdf/7afd6a6398cff8067c8d540d50a56bfa to your computer and use it in GitHub Desktop.
Unhide or unsave links on Reddit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested on Firefox. | |
// Go to https://old.reddit.com/user/<username>/hidden | |
// Open your browser console and run the following code: | |
function eventFire(el, etype) { | |
if (el.fireEvent) { | |
el.fireEvent('on' + etype); | |
} else { | |
var evObj = document.createEvent('Events'); | |
evObj.initEvent(etype, true, false); | |
el.dispatchEvent(evObj); | |
} | |
} | |
$("[action='unhide']").each((index, value) => { eventFire(value, 'click') }) | |
// => All the posts displayed on the page will be unhidden. Just refresh the page to see the change. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Tested on Firefox. | |
// Go to https://old.reddit.com/user/<username>/saved | |
// Open your browser console and run the following code: | |
function eventFire(el, etype) { | |
if (el.fireEvent) { | |
el.fireEvent('on' + etype); | |
} else { | |
var evObj = document.createEvent('Events'); | |
evObj.initEvent(etype, true, false); | |
el.dispatchEvent(evObj); | |
} | |
} | |
$(".link-unsave-button.save-button > a").each((index, value) => { eventFire(value, 'click') }) | |
// => All the posts displayed on the page will be unsaved. Just refresh the page to see the change. | |
// Print all previous saved links (doesn't include saved comments) | |
// str = ''; | |
// $('.bylink.comments.may-blank').each(function(el) { | |
// str += this.href + '\n' | |
// }) | |
// console.log(str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you!! This is a lifesaver. I unknowingly set to perma hide all posts on a mobile app.