这是indexloc提供的服务,不要输入任何密码
Skip to content

FIXED - Error retrieving PowerDeleteSuite from GitHub - NEW SCRIPT INSIDE #90

@ZMOT7S

Description

@ZMOT7S

I wanted to use the script today and noticed it wasn't working correctly so I fixed it. This works for me. I use Reddit Enhancement Suite and have the settings in my reddit profile to use old reddit by default. (uncheck "Use new Reddit as my default experience")

Follow the directions as normal but use this script for your bookmark:

javascript:(function() {
    window.bookmarkver = '1.4';
    var isReddit = document.location.hostname.split('.').slice(-2).join('.') === 'reddit.com';
    var isOverview = !!document.location.href.match(/\/overview\b/i);

    if (isReddit && isOverview) {
        var cacheBustUrl = 'https://raw.githubusercontent.com/j0be/PowerDeleteSuite/master/powerdeletesuite.js?' + Date.now();

        fetch(cacheBustUrl)
            .then(response => response.text())
            .then(data => {
                var script = document.createElement('script');
                script.id = 'pd-script';
                script.innerHTML = data;
                document.head.appendChild(script);
            })
            .catch(() => {
                alert('Error retrieving PowerDeleteSuite from GitHub');
            });

    } else if (confirm('This script can only be run from your own user profile on Reddit. Would you like to go there now?')) {
        document.location = 'https://reddit.com/user/me/overview';
    } else {
        alert('Please go to your Reddit profile before running this script');
    }
})();

If you use the new reddit format, you can try this script but I can not guarantee it will work.

javascript:(function() {
    window.bookmarkver = '1.4';
    var isReddit = document.location.hostname.split('.').slice(-2).join('.') === 'reddit.com';
    var isOverview = !!document.location.href.match(/\/overview\b/i);

    if (isReddit && isOverview) {
        var cacheBustUrl = 'https://raw.githubusercontent.com/j0be/PowerDeleteSuite/master/powerdeletesuite.js?' + Date.now();

        fetch(cacheBustUrl)
            .then(response => response.text())
            .then(data => {
                var script = document.createElement('script');
                script.id = 'pd-script';
                script.innerHTML = data;
                document.head.appendChild(script);
            })
            .catch(() => {
                alert('Error retrieving PowerDeleteSuite from GitHub');
            });

    } else if (confirm('This script can only be run from your own user profile on Reddit. Would you like to go there now?')) {
        document.location = 'https://old.reddit.com/user/me/overview';
    } else {
        alert('Please go to your Reddit profile before running this script');
    }
})();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions