Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
Push long forgotten files
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordmau5 committed Sep 19, 2021
1 parent 511e68b commit 2eac76e
Show file tree
Hide file tree
Showing 283 changed files with 474 additions and 299 deletions.
Binary file added build/chrome/chrome.zip
Binary file not shown.
6 changes: 6 additions & 0 deletions build/chrome/chrome/contentScript.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const s = document.createElement('script');
s.src = chrome.runtime.getURL('chrome/script.js');
s.onload = function() {
this.remove();
};
(document.head || document.documentElement).appendChild(s);
42 changes: 28 additions & 14 deletions build/chrome/chrome/script.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
/*
All code is publicly available at:
https://github.com/Lordmau5/The-FFZ-Addon-Pack
function start() {
const checkFFZInterval = attempts => {
if (window.ffz) {
if (window.localStorage.ffz_ap_converted !== 'true') {
const loadAddons = () => {
window.ffz.addons.enableAddon('ffzap-core');
window.ffz.addons.enableAddon('ffzap-bttv');
window.ffz.addons.enableAddon('ffzap-liriklive');
window.localStorage.ffz_ap_converted = true;
};

window.ffz.addons.on(':ready', loadAddons);
}
} else {
const newAttempts = (attempts || 0) + 1;
if (newAttempts < 60) {
return setTimeout(checkFFZInterval.bind(this, newAttempts), 1000); // eslint-disable-line
}

console.warn(`[FFZ:AP Loader] Could not find FFZ. Injection unsuccessful. (Host: ${window.location.host})`);
}
};

// Don't run on certain sub-domains.
if (/^(?:player|im|chatdepot|tmi|api|spade|api-akamai|dev|)\./.test(window.location.hostname)) return;

This script is solely an injector for the actual script,
which is being appended into the document head on
*.twitch.tv.
No injection is made into the Chrome context.
*/

const script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://cdn.ffzap.com/ffz-ap.min.js';
document.head.appendChild(script);
setTimeout(checkFFZInterval, 1000);
}
start();
25 changes: 9 additions & 16 deletions build/chrome/manifest.json
Original file line number Diff line number Diff line change
@@ -1,31 +1,24 @@
{
"manifest_version": 2,
"manifest_version": 3,
"name": "The FFZ Add-On Pack",
"short_name": "ffz-ap",
"version": "3.1.1",
"version": "3.1.2",
"description": "A combination of add-ons for the Twitch extension \"FrankerFaceZ\"",

"icons": {
"48": "chrome/icon48.png",
"128": "chrome/icon128.png"
},

"web_accessible_resources": [ {
"resources": [ "chrome/script.js" ],
"matches": [ "*://*.twitch.tv/*" ]
} ],

"content_scripts": [ {
"all_frames": true,
"js": [ "chrome/script.js" ],
"js": [ "chrome/contentScript.js" ],
"matches": [ "*://*.twitch.tv/*" ],
"exclude_globs": [ "*://api.twitch.tv/*" ]
} ],

"permissions": [
"*://*.twitch.tv/*"
],

"applications": {
"gecko": {
"id": "@ffz-ap",
"strict_min_version": "57.0",
"update_url": "https://cdn.ffzap.com/firefox-updates.json"
}
}
} ]
}
26 changes: 26 additions & 0 deletions build/ffz-ap.3.2.1/META-INF/manifest.mf
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Manifest-Version: 1.0

Name: manifest.json
Digest-Algorithms: MD5 SHA1 SHA256
MD5-Digest: A4us2pGOOGlh8RvDA2W1Ww==
SHA1-Digest: g/inUorCKjPfxCixG63qJ6M+S1g=
SHA256-Digest: C7V/vBwaJr8EthtJ1neqZyX3dcxf25t0o7NsFiLiM7Y=

Name: chrome/icon128.png
Digest-Algorithms: MD5 SHA1 SHA256
MD5-Digest: 145lJl1k61pwUo5raFrQ3A==
SHA1-Digest: nYPiSHHH6p96Dmxuad+g8zzxtOw=
SHA256-Digest: FiuTsd/4OTCGt+/WWUe4Vx9VbxOYLOwAGDpktsQ7d24=

Name: chrome/icon48.png
Digest-Algorithms: MD5 SHA1 SHA256
MD5-Digest: +SsZYE4Vo4JT24AusiLhDg==
SHA1-Digest: odIgIO2qtg+1Kf7wPUofnWwTBMk=
SHA256-Digest: nl0ghaOxHxSpCF/m08OC2QdyJ8um+gdsDSssYUR8J7g=

Name: chrome/script.js
Digest-Algorithms: MD5 SHA1 SHA256
MD5-Digest: 26biPn/dlyrD0nWMHEByaQ==
SHA1-Digest: QgRoPsZTnYqWCYHSMlRYw2dzws8=
SHA256-Digest: 38IHeF3RwsShkWwkYP6Yr3F1WJlvZggSPp20zhnWadA=

Binary file added build/ffz-ap.3.2.1/META-INF/mozilla.rsa
Binary file not shown.
5 changes: 5 additions & 0 deletions build/ffz-ap.3.2.1/META-INF/mozilla.sf
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Signature-Version: 1.0
MD5-Digest-Manifest: BWNQOHrIa+yJjI4phY3WwA==
SHA1-Digest-Manifest: tI+urLQHuQgzFbIexLm18FYCDB0=
SHA256-Digest-Manifest: 3Oa6mO4oDNu4c/R3aF3Q0mwev++RZs0NTFoymD1ZpEo=

Binary file added build/ffz-ap.3.2.1/chrome/icon128.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/ffz-ap.3.2.1/chrome/icon48.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions build/ffz-ap.3.2.1/chrome/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/*
All code is publicly available at:
https://github.com/Lordmau5/The-FFZ-Addon-Pack
This script is solely an injector for the actual script,
which is being appended into the document head on
*.twitch.tv.
No injection is made into the Chrome context.
*/

const script = document.createElement('script');
script.type = 'text/javascript';
script.src = 'https://cdn.ffzap.com/ffz-ap.min.js';
document.head.appendChild(script);
30 changes: 30 additions & 0 deletions build/ffz-ap.3.2.1/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"manifest_version": 2,
"name": "The FFZ Add-On Pack",
"short_name": "ffz-ap",
"version": "3.2.1",
"description": "A combination of add-ons for the Twitch extension \"FrankerFaceZ\"",

"icons": {
"48": "chrome/icon48.png",
"128": "chrome/icon128.png"
},

"content_scripts": [ {
"all_frames": true,
"js": [ "chrome/script.js" ],
"matches": [ "*://*.twitch.tv/*" ],
"exclude_globs": [ "*://api.twitch.tv/*" ]
} ],

"permissions": [
"*://*.twitch.tv/*"
],

"applications": {
"gecko": {
"id": "@ffz-ap",
"update_url": "https://cdn.ffzap.com/firefox-updates.json"
}
}
}
1 change: 1 addition & 0 deletions build/firefox-updates.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "yes": "no" }
33 changes: 27 additions & 6 deletions build/userscript/injector.user.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// @name The FrankerFaceZ Add-On Pack
// @namespace FFZ-AP
//
// @version 3.1.0
// @version 3.1.2
// @updateURL https://cdn.ffzap.com/injector.user.js
//
// @description A combination of add-ons for the Twitch extension "FrankerFaceZ"
Expand All @@ -26,11 +26,32 @@
// ==/UserScript==

function ffzapInit () {
const ce = document.createElement.bind(document);
const s = ce('script');
s.type = 'text/javascript';
s.src = 'https://cdn.ffzap.com/ffz-ap.min.js';
document.head.appendChild(s);
const checkFFZInterval = attempts => {
if (window.ffz) {
if (window.localStorage.ffz_ap_converted !== 'true') {
const loadAddons = () => {
window.ffz.addons.enableAddon('ffzap-core');
window.ffz.addons.enableAddon('ffzap-bttv');
window.ffz.addons.enableAddon('ffzap-liriklive');
window.localStorage.ffz_ap_converted = true;
};

window.ffz.addons.on(':ready', loadAddons);
}
} else {
const newAttempts = (attempts || 0) + 1;
if (newAttempts < 60) {
return setTimeout(checkFFZInterval.bind(this, newAttempts), 1000); // eslint-disable-line
}

console.warn(`[FFZ:AP Loader] Could not find FFZ. Injection unsuccessful. (Host: ${window.location.host})`);
}
};

// Don't run on certain sub-domains.
if (/^(?:player|im|chatdepot|tmi|api|spade|api-akamai|dev|)\./.test(window.location.hostname)) return;

setTimeout(checkFFZInterval, 1000);
}

ffzapInit();
Loading

0 comments on commit 2eac76e

Please sign in to comment.