FastForwardTeam / FastForward

Don't waste your time with compliance. FastForward automatically skips annoying link shorteners.
https://fastforward.team/
The Unlicense
3.65k stars 289 forks source link

Mv3: Provide an easy way for users to add custom bypasses on the unpacked version #1067

Open NotAProton opened 1 year ago

NotAProton commented 1 year ago

From: #1061

Unknown78 commented 1 year ago

@NotAProton In pull request #921, some features are removed:

Since you said this is good idea, you might as well bring it back everything again on the load unpacked version of MV-3. In case any browser drop support for MV-2, such that it won't be load at all. That will bring functional differences of MV-2 and MV-3 to none and everyone will be happy.


In my vision, there could be 3 variants of this extension:

  1. FastForward MV-2 Unpacked with Full Features
  2. FastForward MV-3 Unpacked with Full Features
  3. FastForward MV-3 Web Store with Limited Features

While 1 and 2 are functionally equivalent, 3 is a subset of 2.

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 30 days with no activity. To undo this, make some activity on this issue or create a new one.

Unknown78 commented 1 year ago

@NotAProton @princessmortix

The download link for FastForward MV-2 Unpacked Version is missing. I've tried the latest Unpacked 2314, but it is MV-3. I couldn't add custom bypass. The latest one I have for Unpacked MV-2 is 2285.

Also, the link for linkvertise.js on INSTALLING.MD is missing. https://raw.githubusercontent.com/FastForwardTeam/FastForward/main/src/linkvertise.js The content should be like this:

domainBypass(/linkvertise\.(com|net)|link-to\.net/, () => {
    if (window.location.href.toString().indexOf("?r=") != -1) {
        const urlParams = new URLSearchParams(window.location.search);
        const r = urlParams.get('r')
        safelyNavigate(atob(decodeURIComponent(r)));
    }

    const rawOpen = XMLHttpRequest.prototype.open;

    XMLHttpRequest.prototype.open = function() {
        this.addEventListener('load', data => {
            if (data.currentTarget.responseText.includes('tokens')) {
                const response = JSON.parse(data.currentTarget.responseText);
                if (!response.data.valid)
                    return insertInfoBox('Please solve the captcha, afterwards we can immediately redirect you');

                const target_token = response.data.tokens['TARGET'];
                const ut = localStorage.getItem("X-LINKVERTISE-UT");
                const linkvertise_link = location.pathname.replace(/\/[0-9]$/, "");

                fetch(`https://publisher.linkvertise.com/api/v1/redirect/link/static${linkvertise_link}?X-Linkvertise-UT=${ut}`).then(r => r.json()).then(json => {
                    if (json?.data.link.target_type !== 'URL') {
                        return insertInfoBox('Due to copyright reasons we are not bypassing linkvertise stored content (paste, download etc)');
                    }
                    if (json?.data.link.id) {
                        const json_body = {
                            serial: btoa(JSON.stringify({
                                timestamp:new Date().getTime(),
                                random:"6548307",
                                link_id:json.data.link.id
                            })),
                            token: target_token
                        }
                        fetch(`https://publisher.linkvertise.com/api/v1/redirect/link${linkvertise_link}/target?X-Linkvertise-UT=${ut}`, {
                            method: "POST",
                            body: JSON.stringify(json_body),
                            headers: {
                                "Accept": 'application/json',
                                "Content-Type": 'application/json'
                            }
                        }).then(r=>r.json()).then(json=>{
                            if (json?.data.target) {
                                safelyNavigate(json.data.target)
                            }
                        })
                    }
                })
            }
        });
        rawOpen.apply(this, arguments);
    }
})
kevin01523 commented 1 year ago

and yeah it broke most bypasses

lostdusty commented 1 year ago

@NotAProton @princessmortix

The download link for FastForward MV-2 Unpacked Version is missing. I've tried the latest Unpacked 2321, but it is MV-3. I couldn't add custom bypass. The latest one I have for Unpacked MV-2 is 2285.

Also, the link for linkvertise.js on INSTALLING.MD is missing. https://raw.githubusercontent.com/FastForwardTeam/FastForward/main/src/linkvertise.js The content should be link this:

domainBypass(/linkvertise\.(com|net)|link-to\.net/, () => {
    if (window.location.href.toString().indexOf("?r=") != -1) {
        const urlParams = new URLSearchParams(window.location.search);
        const r = urlParams.get('r')
        safelyNavigate(atob(decodeURIComponent(r)));
    }

    const rawOpen = XMLHttpRequest.prototype.open;

    XMLHttpRequest.prototype.open = function() {
        this.addEventListener('load', data => {
            if (data.currentTarget.responseText.includes('tokens')) {
                const response = JSON.parse(data.currentTarget.responseText);
                if (!response.data.valid)
                    return insertInfoBox('Please solve the captcha, afterwards we can immediately redirect you');

                const target_token = response.data.tokens['TARGET'];
                const ut = localStorage.getItem("X-LINKVERTISE-UT");
                const linkvertise_link = location.pathname.replace(/\/[0-9]$/, "");

                fetch(`https://publisher.linkvertise.com/api/v1/redirect/link/static${linkvertise_link}?X-Linkvertise-UT=${ut}`).then(r => r.json()).then(json => {
                    if (json?.data.link.target_type !== 'URL') {
                        return insertInfoBox('Due to copyright reasons we are not bypassing linkvertise stored content (paste, download etc)');
                    }
                    if (json?.data.link.id) {
                        const json_body = {
                            serial: btoa(JSON.stringify({
                                timestamp:new Date().getTime(),
                                random:"6548307",
                                link_id:json.data.link.id
                            })),
                            token: target_token
                        }
                        fetch(`https://publisher.linkvertise.com/api/v1/redirect/link${linkvertise_link}/target?X-Linkvertise-UT=${ut}`, {
                            method: "POST",
                            body: JSON.stringify(json_body),
                            headers: {
                                "Accept": 'application/json',
                                "Content-Type": 'application/json'
                            }
                        }).then(r=>r.json()).then(json=>{
                            if (json?.data.target) {
                                safelyNavigate(json.data.target)
                            }
                        })
                    }
                })
            }
        });
        rawOpen.apply(this, arguments);
    }
})

Its not missing, its just under a new branch, and not updated on installing guide.

Unknown78 commented 1 year ago

@princessmortix Could you please show where is the unpacked MV-2 of 2314? I've tried to look for it and couldn't find it.

lostdusty commented 1 year ago

Extension builds can be found at Actions tab, latest MV2 build: https://github.com/FastForwardTeam/FastForward/actions/runs/6282874124

lostdusty commented 1 year ago

You might wanna check: https://github.com/FastForwardTeam/FastForward/releases/tag/manifest-v2-release

Unknown78 commented 1 year ago

@princessmortix What do you mean by the final and last version? Why did you choose to discontinue unpacked MV-2 while the unpacked MV-3 is less featured?

lostdusty commented 1 year ago

@princessmortix What do you mean by the final and last version? Why did you choose to discontinue unpacked MV-2 while the unpacked MV-3 is less featured?

I am not the only on this project.. the release was made by the owner (bs_zombie), and this decision was made by her. We were barely able to handle the extension with one manifest, and now with two it was too hard to handle. We need to help to translate mv2 bypasses to mv3.

aaronliu0130 commented 1 year ago

Could this perhaps be pinned or help-wanted'd?