Functions - FastForwardTeam/FastForward GitHub Wiki

FastForward

Don't waste your time with compliance. FastForward automatically skips annoying link shorteners.

Discord

Get FastForward on Chromium based browsers Get FastForward on Microsoft Edge Get FastForward for Firefox

All Functions

Here is a list of all functions that FastForward has to offer. If you want to know more about a specific function, click on the name of the function.

Table of Contents

Container Functions

domainBypass
hrefBypass

Helper Functions

ODP
setTimeout
setInterval
URL
docSetAttribute
insertInfoBox
transparentProperty
unsafelyAssign
safelyAssign
unsafelyNavigate
safelyNavigate
isGoodLink
unsafelyAssignWithReferrer
decodeURIComponentMod
ensureDomLoaded
ifElement
awaitElement
parseTarget
bypassRequests
persistHash
finish
keepLooking

Crowd Bypass Functions

crowdquery crowdContribute followAndContribute

FFClipboard Functions

ffClipboard.set
ffClipboard.get
ffClipboard.free

Deprecated Functions

backgroundScriptBypassClipboard
bypassClipboard
Crowd Functions

Container Functions

These functions allow bypasses to run. However, these have been deprecated in favor of the new MV3 system.
These are kept for reference purposes, but these will not work for making MV3 bypasses.

domainBypass

This function checks if the host name or any subdomain of the host name matches the given domain. If it does, it will run the given function.

Function call: domainBypass(d,f)

Parameter Type Description
d String The domain to check (can include regex)
f Function The function to run if the domain matches

Example:

domainBypass("example.com", () => {
    safelyNavigate("https://example1.com")
})

hrefBypass

This function checks if the URL matches the given URL. If it does, it will run the given function. Function call: hrefBypass(u,f)

Parameter Type Description
u String The URL to check (can include regex)
f Function The function to run if the URL matches

Example:

hrefBypass("https://scarysite.com/thisisavirus", () => {
    safelyNavigate("https://safesite.com/safenow")
})

Helper Functions

ODP

Defines the property of an object with the given name and options. This can be used to find a part of the DOM needed for bypassing. If it fails, it will throw an error.

Function call (MV2): ODP(t,p,o)
Function call (MV3): this.helpers.ODP(t,p,o)

Parameter Type Description
t Object The target object
p String The property name
o Object The options (Optional)

Example:

ODP(window, "timer", {
    value: 0,
    writable: false
})

setTimeout

Sets a timeout for a function. This is used to bypass link shorteners that use a timer to redirect you.

Function call (MV2): setTimeout(f,t)
Function call (MV3): this.helpers.setTimeout(f,t)

Parameter Type Description
f Function The function to call
t Number The timeout in milliseconds

Example:

ifElement("#skip_form", () => {
    Math.random = () => 1
    **setTimeout(() => $("#skip_form").trigger("submit"), 50)** // This is the important part
})

setInterval

Sets an interval for a function. Will be called every t milliseconds and will go on forever until clearInterval is called.

Function call (MV2): setInterval(f,t)
Function call (MV3): this.helpers.setInterval(f,t)

Parameter Type Description
f Function The function to call
t Number The interval to repeat in milliseconds

Example:

 window.setInterval = f => setInterval(f, 1)
 awaitElement(".skip > .wait > .skip > .btn > a[href]", safelyNavigate)

URL

Returns a URL object. Used to find the full URL; useful if the final URL is in the URL.

Function call (MV2): URL
Function call (MV3): this.helpers.URL

Example:

if (URL.pathname.includes("/skip")) {
    // Do something
}

docSetAttribute

Sets an attribute of the document. This is used to edit the value of a property of an element or create a new element.

Function call (MV2): docSetAttribute(n,v)
Function call (MV3): this.helpers.docSetAttribute(n,v)

Parameter Type Description
n String The name of the attribute
v String The value of the attribute

Example:

 docSetAttribute("{{channel.adlinkfly_info}}", "")

insertInfoBox

Inserts an info box into the DOM. This is used to show the user information or to complete a specific step (do a captcha, for example)
In the MV3 version, you will need to import .\helpers\infoBox.js to use this function.

Function call (MV2): insertInfoBox(t)
Function call (MV3): this.helpers.insertInfoBox(t)

Parameter Type Description
t String The text to show in the info box

Example:

insertInfoBox("{{msg.infoFileHoster}}")) //Not allowed to bypass these sites due to copyright

transparentProperty

Sets a property of an object to be transparent. This is used to allow the user to access properties that are normally not accessible. This is useful for sites that lock access to the final site for a predefined amount of time.

Function call (MV2): transparentProperty(na,fun)
Function call (MV3): this.helpers.transparentProperty(na, fun)

Parameter Type Description
na String The name of the property
fun Function The function to call

Example:

transparentProperty("downloadButton", safelyNavigate)) //Makes the download button clickable

unsafelyAssign

Will directly change the URL of the page. This is the most barebones way to bypass a link shortener.
All other bypassing methods are built on top of this function.

Function call (MV2): unsafelyAssign(u)
Function call (MV3): this.helpers.unsafelyAssign(u)

Parameter Type Description
u String The URL to navigate to

Example:

unsafelyAssign("https://example.com") //Directly changes the URL

safelyAssign

Will check if the URL is safe to navigate to before calling unsafelyAssign. This is used to prevent the user from navigating to a malicious or nonexistent site.

Function call (MV2): safelyAssign(u)
Function call (MV3): this.helpers.safelyAssign(u)

Parameter Type Description
u String The URL to navigate to

Example:

safelyAssign("https://example.com")  //Checks if the URL is safe to navigate to before changing the URL

unsafelyNavigate

Will change the URL of the page directly by routing it through our servers. This is a more secure way to bypass a link shortener, but not as fast as unsafelyAssign. This also prevents the user's IP address from being leaked if the option is turned on in the extension settings.

Function call (MV2): unsafelyNavigate(u)
Function call (MV3): this.helpers.unsafelyNavigate(u)

Parameter Type Description
u String The URL to navigate to

Example:

unsafelyNavigate("https://example.com") //Changes the URL directly by routing it through our servers

safelyNavigate

Will check if the URL is safe to navigate to before calling unsafelyNavigate. This is used to prevent the user from navigating to a malicious or nonexistent site. It also routes the URL through our servers to prevent the user's IP address from being leaked.

Function call (MV2): safelyNavigate(u)
Function call (MV3): this.helpers.safelyNavigate(u)

Parameter Type Description
u String The URL to navigate to

Example:

safelyNavigate("https://example.com") //Checks if URL is safe to navigate before changing the URL through our servers

isGoodLink

Checks if the URL is safe to navigate to. Checks if site exists and if it uses safe protocols.

Function call (MV2): isGoodLink(u)
Function call (MV3): this.helpers.isGoodLink(u)

Parameter Type Description
u String The URL to check

Example:

if (isGoodLink("https://example.com")) {
    // Do something
}

unsafelyAssignWithReferer

Will change the URL of the page directly by routing it through our servers and setting the referer to the current URL. This is used when the site checks the referer to prevent the user from bypassing the link shortener.

Function call (MV2): unsafelyAssignWithReferer(t, r)
Function call (MV3): this.helpers.unsafelyAssignWithReferer(t, r)

Parameter Type Description
t String The URL to navigate to
r String The referer to use

Example:

domainBypass("adbull.me", () => ifElement("form#setc", ({ action }) => {
    unsafelyAssignWithReferer(location.href, action)
}))

decodeURIComponentMod

Decodes a URI component using a custom script to unescape more character. This is used to decode the URL of a link shortener if needed. This will not usually be needed, as the built-in decodeURIComponent function will usually be enough.

Function call (MV2): decodeURIComponentMod(u)
Function call (MV3): this.helpers.decodeURIComponentMod(u)

Parameter Type Description
u String The URL to decode

Example:

decodeURIComponentMod("https%3A%2F%2Fexample.com") //Decodes the URL

ensureDomLoaded

Waits for the DOM to be loaded before calling a function. This is used to prevent the script from running before the DOM is loaded. In mv3, this is not needed, as inserting this.ensure_dom = true in the constructor works in the same manner. However, the function is still available for backwards compatibility and for allowing other functions to work.

Function call (MV2): ensureDomLoaded(f)
Function call (MV3): this.helpers.ensureDomLoaded(f)(Outdated)           this.ensure_dom = true (Recommended)

Parameter Type Description
f Function The function to call

Example:

ensureDomLoaded(() => {
    domainBypass("srt.am", () => {
    if (document.querySelector(".skip-container")) {
        let f = document.createElement("form")
        f.method = "POST"
        f.innerHTML = '<input type="hidden" name="_image" value="Continue">'
        f = document.documentElement.appendChild(f)
        countIt(() => f.submit())
    }
})
})

For MV3, use this.ensure_dom = true in the constructor instead.

constructor() {
    super()
    this.ensure_dom = true
}

countIt

Will set a timer to count down from a specified time and then call a function. This is used to prevent the user from bypassing the link shortener too quickly. By default, this is 10 seconds, you'll need to use setTimeout to use a different time.

Function call (MV2): countIt(f)
Function call (MV3): this.helpers.countIt(f)

Parameter Type Description
f Function The function to call

Example:

hrefBypass(/(4snip\.pw|flare\.icu)\/(out|decode)\//, () => {
    let f = document.querySelector("form[action^='../out2/']")
    f.setAttribute("action", f.getAttribute("action").replace("../out2/", "../outlink/"))
    countIt(() => f.submit()) //Waiting
})

ifElement

Will check if an element exists on the page and then call a function by calling ensureDomLoaded. If the element doesn't exist, the function will check if another function is passed and call it if it is. This is used to prevent the script from running if the element doesn't exist. Generally, you will not need to add a second function, but it can be useful at times.

Function call (MV2): ifElement(e, f, f2)
Function call (MV3): this.helpers.ifElement(e, f, f2)

Parameter Type Description
e String The element to check
f Function The function to call
f2 Function The function to call if the element doesn't exist

Example:

ifElement("a[href^='https://www.shrinkme.io/']", () => {
    // Do something
})

awaitElement

Will wait for an element to appear on the page and then call a function. This does depend on ensureDomLoaded to make sure it will work. This is used to prevent the script from running if the element doesn't exist.

Function call (MV2): awaitElement(e, f)
Function call (MV3): this.helpers.awaitElement(e, f)

Parameter Type Description
e String The element to check
f Function The function to call

Example:

domainBypass(/bc\.vc|bcvc\.live/, () => {
    window.setInterval = f => setInterval(f, 1)
    awaitElement("a#getLink:not([style^='display'])", a => a.click())
})

parseTarget

Checks for the link inside an <a> tag and returns the url. This is used to get the URL of links hidden inside an <a> tag.

Function call (MV2): parseTarget(tar)
Function call (MV3): this.helpers.parseTarget(tar)

Parameter Type Description
tar Element The element to check

Example:

parseTarget(document.querySelector("a[href^='https://www.example.com/']")) //Returns the URL

bypassRequests

Will add an event listener to the page to check for requests and then call a function. This is useful if you need to bypass a link shortener that uses requests to get the final URLs.

Function call (MV2): No MV2 support
Function call (MV3): this.helpers.bypassRequests(f)

Parameter Type Description
f Function The function to call

Example:

this.helpers.bypassRequests(async data => {
  if (data.currentTarget?.responseText?.includes('tokens')) {
    const response = JSON.parse(data.currentTarget.responseText)

persistHash

Adds a hash to all forms and links on the page.

Function call (MV2): persistHash(h)
Function call (MV3): this.helpers.persistHash(h)

Parameter Type Description
h String The hash to add

Example:

if (ignoreCrowdBypass) {
    persistHash("ignoreCrowdBypass")
}

finish

Tells the background script that the bypass is finished. This is used to prevent the script from running again if the user navigates to another page.

Function call (MV2): finish()
Function call (MV3): this.helpers.finish()

Example:

if (location.pathname.substr(0, 13) == "/redirecting/" && document.querySelector("p[style]").textContent == "For your safety, never enter your password unless you're on the real Adf.ly site.") {
    let a = document.querySelector("a[href]")
    if (a) {
        safelyNavigate(a.href)
        return finish()
    }
}

keepLooking

Tells the background script to keep looking for a link.
This is used to prevent the script from running if the element doesn't exist.

Function call (MV2): keepLooking()
Function call (MV3): this.helpers.keepLooking()

Example:

domainBypass(/tr\.link|movienear\.me|lewat\.club|tautan\.pro|(droidtamvan|gubukbisnis|onlinecorp)\.me|(liveshootv|modebaca|haipedia|sekilastekno|miuiku)\.com|shrink\.world|link\.mymastah\.xyz|(sportif|cararoot)\.id|(fcdot|fcc)\.lc/, () => {
    if (typeof app_vars == "undefined") {
        app_vars = {}
    }
    keepLooking()
})

Crowd Bypass Functions

crowdQuery

Dispatches a crowdQuery event and returns a promise to get the response.

Function call (MV-3 only): this.helpers.crowdQuery(domain, path)

Returns: A promise that will resolve into the target listed on the Crowd Bypass server.

Parameter Type Description
domain String The domain to include in the event detail. Include subdomain if not www.
path String The path to include in the event detail. Query string also goes here like a?b=c. Drop the first slash 'a' not '/a'

Example:

this.helpers.crowdQuery("example.com", "a?b=c").then((response) => {
  // handle response
});

crowdContribute

This function dispatches a crowdContribute event.

Function call (MV-3 only): this.helpers.crowdContribute(domain, path, target)

Parameter Type Description
domain string The domain. Include subdomain if not www.
path string The path. Query string also goes here like a?b=c. Drop the first slash.
target string The target must be a fully qualified URL including the protocol.

Example:

this.helpers.crowdContribute(
  "example.com",
  "path/to/page?a=b",
  "https://destination.example"
);

followAndContribute

Dispatches a followAndContribute event. To be used when target http 3xx redirects to the final destination.

Function call: this.helpers.followAndContribute(domain, path, target)

Parameter Type Description
domain string The domain. Include subdomain if not www.
path string The path. Query string also goes here like a?b=c. Drop the first slash.
target string The target must be a fully qualified URL including the protocol.

Example:

this.helpers.followAndContribute(
  "example.com",
  "path/to/page?a=b",
  "https://one-time-link.example"
);

ffclipboard

This ffclipboard API is used for cross-domain temporary storage. It allows you to store variables that can be used on multiple sites. It provides methods for setting, clearing and getting values in the ffclipboard.

ffclipboard.get

This function gets a value from the ffclipboard.

Function call (MV3): this.helpers.ffclipboard.get(key)

Parameter Type Description
key string The key to get the value for.

Returns: A promise that resolves with the value.

Example:

this.helpers.ffclipboard.get("key").then((value) => {
  console.log(value);
});

ffclipboard.set

This function sets a value in the ffclipboard.

Note: Remember to clear the value from the ffclipboard as soon as you are done using it, as browser.storage is limited.

Function call (MV-3 only): this.helpers.ffclipboard.set(key, value)

Parameter Type Description
key string The key to set the value for.
value any The value to set.

Example:

this.helpers.ffclipboard.set("key", "value");

ffclipboard.clear

This function clears a value from the ffclipboard.

Function call (MV-3 only): this.helpers.ffclipboard.clear(key)

Parameter Type Description
key string The key to clear the value for.

Note: Remember to clear the value from the ffclipboard as soon as you are done using it, as browser.storage is limited.

Example:

this.helpers.ffclipboard.clear("key");

Deprecated Functions

These functions are deprecated and have been removed in the MV3 version of the extension.
They are still available for now, but you should not use them.

backgroundScriptBypassClipboard

Helper function that utilized the custom bypass section in the extension settings.
Deprecated in MV3 due to Google no longer allowing unpackaged code in MV3 extensions.

bypassClipboard (Class)

Helped with adding bypasses from the custom bypass section in the extension settings into the main script. Deprecated in MV3 due to Google no longer allowing unpackaged code in MV3 extensions.

crowdBypass, crowdDomain, crowdReferer, contributeAndNavigate

MV2 functions that assisted with the crowd bypass system. Their references have been removed in the MV3 extension and from the server, so they will no longer work.

⚠️ **GitHub.com Fallback** ⚠️