MCPcopy Create free account
hub / github.com/FastForwardTeam/FastForward / finishDownload

Function finishDownload

src/js/background.js:210–230  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

208 updateStatus = "checking"
209 sendToOptions({updateStatus})
210 const finishDownload = () => {
211 channel = {}
212 let uniqueness = []
213 ;["stop_watching","count_it","crowd_referer","crowd_domain","crowd_path","crowd_query","crowd_queried","crowd_contribute","adlinkfly_info","adlinkfly_target","bypass_clipboard"].forEach(name => {
214 let val
215 do
216 {
217 val = Math.random().toString().substr(2)
218 }
219 while(uniqueness.indexOf(val) != -1);
220 uniqueness.push(val)
221 upstreamInjectionScript = upstreamInjectionScript.split("{{channel."+name+"}}").join(channel[name] = "data-" + val)
222 })
223 ;["infoLinkvertise","infoFileHoster","infoOutdated","crowdWait","crowdDisabled"].forEach(name => {
224 upstreamInjectionScript = upstreamInjectionScript.split("{{msg."+name+"}}").join(brws.i18n.getMessage(name).split("\\").join("\\\\").split("\"").join("\\\""))
225 })
226 upstreamInjectionScript = upstreamInjectionScript.split("{{icon/48.png}}").join(brws.runtime.getURL("icon/48.png"))
227 refreshInjectionScript()
228 updateStatus = ""
229 sendToOptions({upstreamCommit, updateStatus})
230 }
231 let xhr = new XMLHttpRequest()
232 xhr.onload = () => {
233 updateStatus = "updating"

Callers 1

updateBypassDefinitionsFunction · 0.85

Calls 2

refreshInjectionScriptFunction · 0.85
sendToOptionsFunction · 0.85

Tested by

no test coverage detected