diff --git a/.gitignore b/.gitignore
index 6cf9a03..b9f1512 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,3 +4,4 @@ build
dist
node_modules
tmp
+.env
\ No newline at end of file
diff --git a/chrome/common/lib/constants.js b/chrome/common/lib/constants.js
index ebb5fb3..5124969 100644
--- a/chrome/common/lib/constants.js
+++ b/chrome/common/lib/constants.js
@@ -1,24 +1,23 @@
-(function (){
-
+(function () {
var root = this;
var constants = {
twitchApi: {
- api : "https://id.twitch.tv/oauth2/authorize",
- response_type: 'token',
- client_id : 'nhrhocc8g5gfm8w98oi9ozuuo4ser2',
- client_secret: '2ovjqj5of99gpmkdjyiyyz6mgvdo79',
- scope : 'openid user:read:follows user:read:email',
- redirect_uri : 'https://ndragomirov.github.io/twitch.html'
- }
+ api: "https://id.twitch.tv/oauth2/authorize",
+ response_type: "token",
+ client_id: "nhrhocc8g5gfm8w98oi9ozuuo4ser2",
+ client_secret: "",
+ scope: "openid user:read:follows user:read:email",
+ redirect_uri: "https://ndragomirov.github.io/twitch.html",
+ },
};
- if ( typeof exports !== 'undefined' ) {
- if ( typeof module !== 'undefined' && module.exports ) {
+ if (typeof exports !== "undefined") {
+ if (typeof module !== "undefined" && module.exports) {
exports = module.exports = constants;
}
exports.constants = constants;
} else {
root.constants = constants;
}
-}).call(this);
\ No newline at end of file
+}.call(this));
diff --git a/chrome/manifest.json b/chrome/manifest.json
index 7d26b3a..e645e5a 100644
--- a/chrome/manifest.json
+++ b/chrome/manifest.json
@@ -1,63 +1,63 @@
{
- "name": "Twitch Companion",
- "version": "2.1.0",
- "default_locale": "en",
- "manifest_version": 2,
- "description": "Access quickly to your favorite streams and search them by games. Be notified by popup of which one of your favorite streamers are online. Fully customizable application through parameters tab.",
- "content_scripts": [
- {
- "run_at": "document_start",
- "matches": [
- "*://*.twitch.tv/*"
- ],
- "all_frames": true,
- "js": [
- "common/content/theatre-mode.js"
- ]
- }
- ],
- "background": {
- "scripts": [
- "common/lib/constants.js",
- "common/dist/contributors.js",
- "common/lib/3rd/async.js",
- "common/lib/3rd/jquery.js",
- "common/lib/3rd/underscore.js",
- "common/lib/3rd/backbone.js",
- "common/lib/3rd/backbone.memento.js",
- "common/lib/3rd/backbone.mixin.js",
- "common/lib/3rd/eventemitter.js",
- "common/lib/utils.js",
- "common/lib/oauth2.js",
- "background.js",
- "common/lib/twitch-api.js",
- "common/lib/onerror.js",
- "common/lib/app.js"
+ "name": "Twitch Companion",
+ "version": "2.2.0",
+ "default_locale": "en",
+ "manifest_version": 2,
+ "description": "Access quickly to your favorite streams and search them by games. Be notified by popup of which one of your favorite streamers are online. Fully customizable application through parameters tab.",
+ "content_scripts": [
+ {
+ "run_at": "document_start",
+ "matches": [
+ "*://*.twitch.tv/*"
+ ],
+ "all_frames": true,
+ "js": [
+ "common/content/theatre-mode.js"
+ ]
+ }
],
- "persistent": true
- },
- "minimum_chrome_version": "1.1.142",
- "icons": {
- "16": "common/icons/16.png",
- "32": "common/icons/32.png",
- "48": "common/icons/48.png",
- "64": "common/icons/64.png",
- "128": "common/icons/128.png"
- },
- "browser_action": {
- "default_icon": {
- "16": "common/icons/16.png",
- "32": "common/icons/32.png",
- "48": "common/icons/48.png"
+ "background": {
+ "scripts": [
+ "common/lib/constants.js",
+ "common/dist/contributors.js",
+ "common/lib/3rd/async.js",
+ "common/lib/3rd/jquery.js",
+ "common/lib/3rd/underscore.js",
+ "common/lib/3rd/backbone.js",
+ "common/lib/3rd/backbone.memento.js",
+ "common/lib/3rd/backbone.mixin.js",
+ "common/lib/3rd/eventemitter.js",
+ "common/lib/utils.js",
+ "common/lib/oauth2.js",
+ "background.js",
+ "common/lib/twitch-api.js",
+ "common/lib/onerror.js",
+ "common/lib/app.js"
+ ],
+ "persistent": true
},
- "default_popup": "common/html/popup.html"
- },
- "permissions": [
- "storage",
- "background",
- "*://*.twitch.tv/*",
- "*://ndragomirov.github.io/*",
- "notifications",
- "tabs"
- ]
+ "minimum_chrome_version": "1.1.142",
+ "icons": {
+ "16": "common/icons/16.png",
+ "32": "common/icons/32.png",
+ "48": "common/icons/48.png",
+ "64": "common/icons/64.png",
+ "128": "common/icons/128.png"
+ },
+ "browser_action": {
+ "default_icon": {
+ "16": "common/icons/16.png",
+ "32": "common/icons/32.png",
+ "48": "common/icons/48.png"
+ },
+ "default_popup": "common/html/popup.html"
+ },
+ "permissions": [
+ "storage",
+ "background",
+ "*://*.twitch.tv/*",
+ "*://ndragomirov.github.io/*",
+ "notifications",
+ "tabs"
+ ]
}
\ No newline at end of file
diff --git a/common/html/popup.html b/common/html/popup.html
index 7b40a84..e8c9718 100644
--- a/common/html/popup.html
+++ b/common/html/popup.html
@@ -85,8 +85,8 @@
diff --git a/firefox/common/lib/constants.js b/firefox/common/lib/constants.js
index 365f3c0..ac637fc 100644
--- a/firefox/common/lib/constants.js
+++ b/firefox/common/lib/constants.js
@@ -1,24 +1,23 @@
(function () {
+ var root = this;
- var root = this;
+ var constants = {
+ twitchApi: {
+ api: "https://id.twitch.tv/oauth2/authorize",
+ response_type: "token",
+ client_id: "nhrhocc8g5gfm8w98oi9ozuuo4ser2",
+ client_secret: "",
+ scope: "openid user:read:follows user:read:email",
+ redirect_uri: "https://ndragomirov.github.io/twitch-firefox.html",
+ },
+ };
- var constants = {
- twitchApi: {
- api: "https://id.twitch.tv/oauth2/authorize",
- response_type: 'token',
- client_id: 'nhrhocc8g5gfm8w98oi9ozuuo4ser2',
- client_secret: '2ovjqj5of99gpmkdjyiyyz6mgvdo79',
- scope: 'openid user:read:follows user:read:email',
- redirect_uri: 'https://ndragomirov.github.io/twitch-firefox.html'
- }
- };
-
- if (typeof exports !== 'undefined') {
- if (typeof module !== 'undefined' && module.exports) {
- exports = module.exports = constants;
- }
- exports.constants = constants;
- } else {
- root.constants = constants;
+ if (typeof exports !== "undefined") {
+ if (typeof module !== "undefined" && module.exports) {
+ exports = module.exports = constants;
}
-}).call(this);
\ No newline at end of file
+ exports.constants = constants;
+ } else {
+ root.constants = constants;
+ }
+}.call(this));
diff --git a/firefox/manifest.json b/firefox/manifest.json
index 4ef8f54..b32c5b9 100644
--- a/firefox/manifest.json
+++ b/firefox/manifest.json
@@ -1,62 +1,62 @@
{
- "name": "Twitch Companion",
- "version": "2.1.0",
- "default_locale": "en",
- "manifest_version": 2,
- "description": "Access quickly to your favorite streams and search them by games. Be notified by popup of which one of your favorite streamers are online. Fully customizable application through parameters tab.",
- "content_scripts": [
- {
- "run_at": "document_start",
- "matches": [
- "*://*.twitch.tv/*"
- ],
- "all_frames": true,
- "js": [
- "common/content/theatre-mode.js"
- ]
- }
- ],
- "background": {
- "scripts": [
- "common/lib/constants.js",
- "common/dist/contributors.js",
- "common/lib/3rd/async.js",
- "common/lib/3rd/jquery.js",
- "common/lib/3rd/underscore.js",
- "common/lib/3rd/backbone.js",
- "common/lib/3rd/backbone.memento.js",
- "common/lib/3rd/backbone.mixin.js",
- "common/lib/3rd/eventemitter.js",
- "common/lib/utils.js",
- "common/lib/oauth2.js",
- "background.js",
- "common/lib/twitch-api.js",
- "common/lib/onerror.js",
- "common/lib/app.js"
+ "name": "Twitch Companion",
+ "version": "2.2.0",
+ "default_locale": "en",
+ "manifest_version": 2,
+ "description": "Access quickly to your favorite streams and search them by games. Be notified by popup of which one of your favorite streamers are online. Fully customizable application through parameters tab.",
+ "content_scripts": [
+ {
+ "run_at": "document_start",
+ "matches": [
+ "*://*.twitch.tv/*"
+ ],
+ "all_frames": true,
+ "js": [
+ "common/content/theatre-mode.js"
+ ]
+ }
],
- "persistent": true
- },
- "minimum_chrome_version": "1.1.142",
- "icons": {
- "16": "common/icons/16.png",
- "32": "common/icons/32.png",
- "48": "common/icons/48.png",
- "64": "common/icons/64.png",
- "128": "common/icons/128.png"
- },
- "browser_action": {
- "default_icon": {
- "16": "common/icons/16.png",
- "32": "common/icons/32.png",
- "48": "common/icons/48.png"
+ "background": {
+ "scripts": [
+ "common/lib/constants.js",
+ "common/dist/contributors.js",
+ "common/lib/3rd/async.js",
+ "common/lib/3rd/jquery.js",
+ "common/lib/3rd/underscore.js",
+ "common/lib/3rd/backbone.js",
+ "common/lib/3rd/backbone.memento.js",
+ "common/lib/3rd/backbone.mixin.js",
+ "common/lib/3rd/eventemitter.js",
+ "common/lib/utils.js",
+ "common/lib/oauth2.js",
+ "background.js",
+ "common/lib/twitch-api.js",
+ "common/lib/onerror.js",
+ "common/lib/app.js"
+ ],
+ "persistent": true
},
- "default_popup": "common/html/popup.html"
- },
- "permissions": [
- "storage",
- "https://*/*",
- "http://*/*",
- "notifications",
- "tabs"
- ]
+ "minimum_chrome_version": "1.1.142",
+ "icons": {
+ "16": "common/icons/16.png",
+ "32": "common/icons/32.png",
+ "48": "common/icons/48.png",
+ "64": "common/icons/64.png",
+ "128": "common/icons/128.png"
+ },
+ "browser_action": {
+ "default_icon": {
+ "16": "common/icons/16.png",
+ "32": "common/icons/32.png",
+ "48": "common/icons/48.png"
+ },
+ "default_popup": "common/html/popup.html"
+ },
+ "permissions": [
+ "storage",
+ "https://*/*",
+ "http://*/*",
+ "notifications",
+ "tabs"
+ ]
}
\ No newline at end of file
diff --git a/gulpfile.js b/gulpfile.js
index 0a95d8f..8fb5a10 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -3,35 +3,175 @@ var handlebars = require("gulp-handlebars");
var del = require("del");
var wrap = require("gulp-wrap");
var declare = require("gulp-declare");
-var shell = require("gulp-shell");
var merge = require("merge-stream");
-var stripDebug = require("gulp-strip-debug");
var concat = require("gulp-concat");
-var runSequence = require("run-sequence");
-var i18n = require("./gulp-i18n.js");
var zip = require("gulp-zip");
-var bump = require("gulp-bump");
var fs = require("fs");
-var jshint = require("gulp-jshint");
-var jshint = require("gulp-jshint");
var request = require("request");
-gulp.task("lint", function () {
- return gulp
- .src(["./common/lib/*.js"])
- .pipe(
- jshint({
- moz: true,
- asi: true,
- maxparams: 5,
- maxdepth: 4,
- maxstatements: 35,
- maxcomplexity: 10,
- })
- )
- .pipe(jshint.reporter("default"));
+// Function to replace secret inside constants
+let replaceSecret = (osname) => {
+ // Write secret from .env to build/chrome/common/
+ try {
+ var secret = fs
+ .readFileSync(".env")
+ .toString()
+ .split("\n")
+ .find((keyValue) => keyValue.includes("TWITCH_SECRET"))
+ .split("=")[1];
+ let constants = fs
+ .readFileSync("build/" + osname + "/common/lib/constants.js")
+ .toString();
+ constants = constants.replace(
+ 'client_secret: ""',
+ 'client_secret: "' + secret + '"'
+ );
+ fs.writeFileSync("build/" + osname + "/common/lib/constants.js", constants);
+ } catch (err) {
+ throw new Error(
+ ".env is not present with good format. Please read Readme.md file."
+ );
+ }
+};
+
+let upgradeVersion = (kindOfUpgrade, previousVersion) => {
+ let index = 0;
+ switch (kindOfUpgrade) {
+ case "minor":
+ index = 2;
+ break;
+ case "medium":
+ index = 1;
+ break;
+ case "major":
+ break;
+ default:
+ throw new Error("kindOfUpgrade argument not correct");
+ }
+ let splitted = previousVersion.split(".");
+ splitted[index] = `${parseInt(splitted[index]) + 1}`;
+ for (let i = index + 1; i < splitted.length; i++) splitted[i] = "0";
+ return splitted.join(".");
+};
+
+let upgradePackageVersion = (kindOfUpgrade) => {
+ var packageContent = JSON.parse(fs.readFileSync("package.json"));
+ packageContent.version = upgradeVersion(
+ kindOfUpgrade,
+ packageContent.version
+ );
+ fs.writeFileSync("package.json", JSON.stringify(packageContent, null, 4));
+};
+
+let upgradeManifestVersion = (osname, kindOfUpgrade) => {
+ var manifestContent = JSON.parse(fs.readFileSync(osname + "/manifest.json"));
+ manifestContent.version = upgradeVersion(
+ kindOfUpgrade,
+ manifestContent.version
+ );
+ fs.writeFileSync(
+ osname + "/manifest.json",
+ JSON.stringify(manifestContent, null, 4)
+ );
+};
+
+// Upgrade tasks for package
+gulp.task("upgrade:package:minor", function (done) {
+ upgradePackageVersion("minor");
+ done();
+});
+gulp.task("upgrade:package:medium", function (done) {
+ upgradePackageVersion("medium");
+ done();
+});
+gulp.task("upgrade:package:major", function (done) {
+ upgradePackageVersion("major");
+ done();
+});
+
+// Upgrade tasks for Chrome
+gulp.task("upgrade:chrome:minor", function (done) {
+ upgradeManifestVersion("chrome", "minor");
+ done();
+});
+gulp.task("upgrade:chrome:medium", function (done) {
+ upgradeManifestVersion("chrome", "medium");
+ done();
+});
+gulp.task("upgrade:chrome:major", function (done) {
+ upgradeManifestVersion("chrome", "major");
+ done();
});
+// Upgrade tasks for Firefox
+gulp.task("upgrade:firefox:minor", function (done) {
+ upgradeManifestVersion("firefox", "minor");
+ done();
+});
+gulp.task("upgrade:firefox:medium", function (done) {
+ upgradeManifestVersion("firefox", "medium");
+ done();
+});
+gulp.task("upgrade:firefox:major", function (done) {
+ upgradeManifestVersion("firefox", "major");
+ done();
+});
+
+// Upgrade tasks for Opera
+gulp.task("upgrade:opera:minor", function (done) {
+ upgradeManifestVersion("opera", "minor");
+ done();
+});
+gulp.task("upgrade:opera:medium", function (done) {
+ upgradeManifestVersion("opera", "medium");
+ done();
+});
+gulp.task("upgrade:opera:major", function (done) {
+ upgradeManifestVersion("opera", "major");
+ done();
+});
+
+// Upgrade tasks for all OS
+gulp.task(
+ "upgrade:minor",
+ gulp.series(
+ "upgrade:package:minor",
+ "upgrade:chrome:minor",
+ "upgrade:firefox:minor",
+ "upgrade:opera:minor",
+ function (done) {
+ done();
+ }
+ )
+);
+
+gulp.task(
+ "upgrade:medium",
+ gulp.series(
+ "upgrade:package:medium",
+ "upgrade:chrome:medium",
+ "upgrade:firefox:medium",
+ "upgrade:opera:medium",
+ function (done) {
+ done();
+ }
+ )
+);
+
+gulp.task(
+ "upgrade:major",
+ gulp.series(
+ "upgrade:package:major",
+ "upgrade:chrome:major",
+ "upgrade:firefox:major",
+ "upgrade:opera:major",
+ function (done) {
+ done();
+ }
+ )
+);
+
+// Copy operations
gulp.task("copy:opera", function () {
return gulp
.src(["build/chrome/**", "opera/**"])
@@ -54,6 +194,23 @@ gulp.task("copy:chrome", function () {
return merge(c1, c2, c3);
});
+// Secret replacement operations
+gulp.task("secret:opera", function (done) {
+ replaceSecret("opera");
+ done();
+});
+
+gulp.task("secret:firefox", function (done) {
+ replaceSecret("firefox");
+ done();
+});
+
+gulp.task("secret:chrome", function (done) {
+ replaceSecret("chrome");
+ done();
+});
+
+// Code concatenation operations
gulp.task("concat:popupjs", function () {
return gulp
.src([
@@ -100,13 +257,7 @@ gulp.task("concat:popupcss", function () {
.pipe(gulp.dest("common/dist/"));
});
-gulp.task("stripdebug", function () {
- return gulp
- .src(["build/**/*.js"])
- .pipe(stripDebug())
- .pipe(gulp.dest("build/"));
-});
-
+// Clean operations
gulp.task("clean:dist", function (done) {
del.sync(["dist/*"]);
done();
@@ -127,6 +278,7 @@ gulp.task("clean:firefox", function (done) {
done();
});
+// Compression tasks for distribution
gulp.task("compress:chrome", function () {
var v = JSON.parse(fs.readFileSync("package.json")).version;
@@ -154,6 +306,7 @@ gulp.task("compress:firefox", function () {
.pipe(gulp.dest("dist/"));
});
+// Task to manage handlebars templates
gulp.task("handlebars", function () {
return gulp
.src("templates/*.html")
@@ -169,6 +322,7 @@ gulp.task("handlebars", function () {
.pipe(gulp.dest("common/dist/"));
});
+// Task to fetch contributors
gulp.task("contributors", function (cb) {
request(
{
@@ -191,27 +345,7 @@ gulp.task("contributors", function (cb) {
);
});
-gulp.task("bump", function (done) {
- gulp
- .src([
- "./package.json",
- "./chrome/manifest.json",
- "./opera/manifest.json",
- "./firefox/manifest.json",
- ])
- .pipe(bump())
- .pipe(
- gulp.dest(function (d) {
- return d.base;
- })
- );
- done();
-});
-
-gulp.task("watch", function () {
- gulp.watch(["common/**", "templates/**"], ["chrome"]);
-});
-
+// Gulp main task for build
gulp.task(
"chrome",
gulp.series(
@@ -221,6 +355,7 @@ gulp.task(
"concat:popupcss",
"concat:popupjs",
"copy:chrome",
+ "secret:chrome",
function (done) {
done();
}
@@ -229,36 +364,24 @@ gulp.task(
gulp.task(
"opera",
- gulp.series("chrome", "clean:opera", "copy:opera", function (done) {
- done();
- })
+ gulp.series(
+ "chrome",
+ "clean:opera",
+ "copy:opera",
+ "secret:opera",
+ function (done) {
+ done();
+ }
+ )
);
gulp.task(
"firefox",
- gulp.series("chrome", "clean:firefox", "copy:firefox", function (done) {
- done();
- })
-);
-
-gulp.task("firefox-watch", function () {
- gulp.watch(
- "common/lib/*",
- gulp.series("chrome", "clean:firefox", "copy:firefox", function (done) {
- done();
- })
- );
-});
-
-gulp.task(
- "dist",
gulp.series(
- ["bump", "clean:dist"],
"chrome",
- "opera",
- "firefox",
- "stripdebug",
- ["compress:chrome", "compress:opera", "compress:firefox"],
+ "clean:firefox",
+ "copy:firefox",
+ "secret:firefox",
function (done) {
done();
}
diff --git a/opera/common/lib/constants.js b/opera/common/lib/constants.js
index 867eb48..636064b 100644
--- a/opera/common/lib/constants.js
+++ b/opera/common/lib/constants.js
@@ -1,24 +1,23 @@
-(function (){
-
+(function () {
var root = this;
var constants = {
twitchApi: {
- api : "https://id.twitch.tv/oauth2/authorize",
- response_type: 'token',
- client_id : 'nhrhocc8g5gfm8w98oi9ozuuo4ser2',
- client_secret: '2ovjqj5of99gpmkdjyiyyz6mgvdo79',
- scope : 'openid user:read:follows user:read:email',
- redirect_uri : 'https://ndragomirov.github.io/twitch-opera.html'
- }
+ api: "https://id.twitch.tv/oauth2/authorize",
+ response_type: "token",
+ client_id: "nhrhocc8g5gfm8w98oi9ozuuo4ser2",
+ client_secret: "",
+ scope: "openid user:read:follows user:read:email",
+ redirect_uri: "https://ndragomirov.github.io/twitch-opera.html",
+ },
};
- if ( typeof exports !== 'undefined' ) {
- if ( typeof module !== 'undefined' && module.exports ) {
+ if (typeof exports !== "undefined") {
+ if (typeof module !== "undefined" && module.exports) {
exports = module.exports = constants;
}
exports.constants = constants;
} else {
root.constants = constants;
}
-}).call(this);
\ No newline at end of file
+}.call(this));
diff --git a/opera/manifest.json b/opera/manifest.json
index 281a538..e083823 100644
--- a/opera/manifest.json
+++ b/opera/manifest.json
@@ -1,62 +1,62 @@
{
- "name": "Twitch Companion",
- "version": "2.1.0",
- "default_locale": "en",
- "manifest_version": 2,
- "description": "Access quickly to your favorite streams and search them by games. Be notified by popup of which one of your favorite streamers are online. Fully customizable application through parameters tab.",
- "content_scripts": [
- {
- "run_at": "document_start",
- "matches": [
- "*://*.twitch.tv/*"
- ],
- "all_frames": true,
- "js": [
- "common/content/theatre-mode.js"
- ]
- }
- ],
- "background": {
- "scripts": [
- "common/lib/constants.js",
- "common/dist/contributors.js",
- "common/lib/3rd/async.js",
- "common/lib/3rd/jquery.js",
- "common/lib/3rd/underscore.js",
- "common/lib/3rd/backbone.js",
- "common/lib/3rd/backbone.memento.js",
- "common/lib/3rd/backbone.mixin.js",
- "common/lib/3rd/eventemitter.js",
- "common/lib/utils.js",
- "common/lib/oauth2.js",
- "background.js",
- "common/lib/twitch-api.js",
- "common/lib/onerror.js",
- "common/lib/app.js"
+ "name": "Twitch Companion",
+ "version": "2.2.0",
+ "default_locale": "en",
+ "manifest_version": 2,
+ "description": "Access quickly to your favorite streams and search them by games. Be notified by popup of which one of your favorite streamers are online. Fully customizable application through parameters tab.",
+ "content_scripts": [
+ {
+ "run_at": "document_start",
+ "matches": [
+ "*://*.twitch.tv/*"
+ ],
+ "all_frames": true,
+ "js": [
+ "common/content/theatre-mode.js"
+ ]
+ }
],
- "persistent": true
- },
- "minimum_chrome_version": "1.1.142",
- "icons": {
- "16": "common/icons/16.png",
- "32": "common/icons/32.png",
- "48": "common/icons/48.png",
- "64": "common/icons/64.png",
- "128": "common/icons/128.png"
- },
- "browser_action": {
- "default_icon": {
- "16": "common/icons/16.png",
- "32": "common/icons/32.png",
- "48": "common/icons/48.png"
+ "background": {
+ "scripts": [
+ "common/lib/constants.js",
+ "common/dist/contributors.js",
+ "common/lib/3rd/async.js",
+ "common/lib/3rd/jquery.js",
+ "common/lib/3rd/underscore.js",
+ "common/lib/3rd/backbone.js",
+ "common/lib/3rd/backbone.memento.js",
+ "common/lib/3rd/backbone.mixin.js",
+ "common/lib/3rd/eventemitter.js",
+ "common/lib/utils.js",
+ "common/lib/oauth2.js",
+ "background.js",
+ "common/lib/twitch-api.js",
+ "common/lib/onerror.js",
+ "common/lib/app.js"
+ ],
+ "persistent": true
},
- "default_popup": "common/html/popup.html"
- },
- "permissions": [
- "storage",
- "https://*/*",
- "http://*/*",
- "tabs",
- "notifications"
- ]
+ "minimum_chrome_version": "1.1.142",
+ "icons": {
+ "16": "common/icons/16.png",
+ "32": "common/icons/32.png",
+ "48": "common/icons/48.png",
+ "64": "common/icons/64.png",
+ "128": "common/icons/128.png"
+ },
+ "browser_action": {
+ "default_icon": {
+ "16": "common/icons/16.png",
+ "32": "common/icons/32.png",
+ "48": "common/icons/48.png"
+ },
+ "default_popup": "common/html/popup.html"
+ },
+ "permissions": [
+ "storage",
+ "https://*/*",
+ "http://*/*",
+ "tabs",
+ "notifications"
+ ]
}
\ No newline at end of file
diff --git a/package.json b/package.json
index c8db570..0aefe16 100644
--- a/package.json
+++ b/package.json
@@ -1,49 +1,53 @@
{
- "name": "twitch-companion",
- "version": "2.1.0",
- "description": "A way to easily interact with Twitch platform !",
- "dependencies": {
- "semver": "^7.3.2",
- "through2": "^2.0.5",
- "web-ext": "^6.7.0"
- },
- "devDependencies": {
- "del": "^2.1.0",
- "gulp": "^4.0.2",
- "gulp-bump": "^1.0.0",
- "gulp-concat": "^2.6.0",
- "gulp-declare": "^0.3.0",
- "gulp-handlebars": "^5.0.2",
- "gulp-jshint": "^2.1.0",
- "gulp-shell": "^0.5.1",
- "gulp-strip-debug": "^3.0.0",
- "gulp-util": "^3.0.7",
- "gulp-wrap": "^0.15.0",
- "gulp-zip": "^3.0.2",
- "jshint": "^2.10.3",
- "merge-stream": "^1.0.0",
- "request": "^2.88.0",
- "run-sequence": "^1.1.4"
- },
- "scripts": {
- "build:all": "gulp firefox && gulp chrome && gulp opera",
- "build:firefox": "gulp firefox",
- "build:chrome": "gulp chrome",
- "build:opera": "gulp opera",
- "package:all": "npm run package:firefox && npm run package:chrome && npm run package:opera ",
- "package:firefox": "npm run build:firefox && gulp compress:firefox",
- "package:chrome": "npm run build:chrome && gulp compress:chrome",
- "package:opera": "npm run build:opera && gulp compress:opera",
- "dev:firefox": "web-ext run --source-dir ./build/firefox"
- },
- "repository": {
- "type": "git",
- "url": "https://github.com/LPauzies/twitch-companion"
- },
- "author": "lucas.pauzies@hotmail.fr",
- "license": "GPL3",
- "bugs": {
- "url": "https://github.com/LPauzies/twitch-companion/issues"
- },
- "homepage": "https://github.com/LPauzies/twitch-companion"
+ "name": "twitch-companion",
+ "version": "2.2.0",
+ "description": "A way to easily interact with Twitch platform !",
+ "dependencies": {
+ "semver": "^7.3.2",
+ "through2": "^2.0.5",
+ "web-ext": "^6.7.0"
+ },
+ "devDependencies": {
+ "del": "^2.1.0",
+ "gulp": "^4.0.2",
+ "gulp-bump": "^1.0.0",
+ "gulp-concat": "^2.6.0",
+ "gulp-declare": "^0.3.0",
+ "gulp-handlebars": "^5.0.2",
+ "gulp-jshint": "^2.1.0",
+ "gulp-shell": "^0.5.1",
+ "gulp-strip-debug": "^3.0.0",
+ "gulp-util": "^3.0.7",
+ "gulp-wrap": "^0.15.0",
+ "gulp-zip": "^3.0.2",
+ "jshint": "^2.10.3",
+ "merge-stream": "^1.0.0",
+ "request": "^2.88.0",
+ "run-sequence": "^1.1.4"
+ },
+ "scripts": {
+ "build:all": "gulp firefox && gulp chrome && gulp opera",
+ "build:firefox": "gulp firefox",
+ "build:chrome": "gulp chrome",
+ "build:opera": "gulp opera",
+ "package:all": "npm run package:firefox && npm run package:chrome && npm run package:opera",
+ "package:firefox": "npm run build:firefox && gulp compress:firefox",
+ "package:chrome": "npm run build:chrome && gulp compress:chrome",
+ "package:opera": "npm run build:opera && gulp compress:opera",
+ "dist:all:minor": "npm run clean && gulp clean:dist && gulp upgrade:minor && npm run package:all",
+ "dist:all:medium": "npm run clean && gulp clean:dist && gulp upgrade:medium && npm run package:all",
+ "dist:all:major": "npm run clean && gulp clean:dist && gulp upgrade:major && npm run package:all",
+ "clean": "gulp clean:dist",
+ "dev:firefox": "web-ext run --source-dir ./build/firefox"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/LPauzies/twitch-companion"
+ },
+ "author": "lucas.pauzies@hotmail.fr",
+ "license": "GPL3",
+ "bugs": {
+ "url": "https://github.com/LPauzies/twitch-companion/issues"
+ },
+ "homepage": "https://github.com/LPauzies/twitch-companion"
}
\ No newline at end of file
diff --git a/readme.md b/readme.md
index c6a561b..332e52e 100644
--- a/readme.md
+++ b/readme.md
@@ -11,7 +11,7 @@
Twitch companion allows you to quickly access your favorite streamers. Search streamers by games and access it directly from the extension. Twitch companion allow you to get in touch of which one of your followed streamers is going live by using popup messages (can be disabled through parameters)
The application is fully customizable through parameters tab.
-The application supports multiple languages such ENG, FR, ES and more.
+The application supports multiple languages such EN, FR, ES and more.
Source code available here : https://github.com/LPauzies/twitch-companion
@@ -27,6 +27,12 @@ Before all, you need to install dependencies:
$ npm install
```
+After you need to have a secret for the twitch application, go to your developer console and get a secret.
+Push it to `.env` file at root.
+```
+$ echo "TWITCH_SECRET=my-twitch-secret" > .env
+```
+
To build every versions of the extension :
```
$ npm run build:all
diff --git a/screenshots/2.JPG b/screenshots/firefox/screen_1.JPG
similarity index 100%
rename from screenshots/2.JPG
rename to screenshots/firefox/screen_1.JPG
diff --git a/screenshots/3.JPG b/screenshots/firefox/screen_2.JPG
similarity index 100%
rename from screenshots/3.JPG
rename to screenshots/firefox/screen_2.JPG
diff --git a/screenshots/4.JPG b/screenshots/firefox/screen_3.JPG
similarity index 100%
rename from screenshots/4.JPG
rename to screenshots/firefox/screen_3.JPG
diff --git a/screenshots/1.JPG b/screenshots/firefox/screen_4.JPG
similarity index 100%
rename from screenshots/1.JPG
rename to screenshots/firefox/screen_4.JPG
diff --git a/screenshots/opera/promo_1.png b/screenshots/opera/promo_1.png
new file mode 100644
index 0000000..ad33ef6
Binary files /dev/null and b/screenshots/opera/promo_1.png differ
diff --git a/screenshots/opera/screen_1.JPG b/screenshots/opera/screen_1.JPG
new file mode 100644
index 0000000..6b1366a
Binary files /dev/null and b/screenshots/opera/screen_1.JPG differ
diff --git a/screenshots/opera/screen_2.JPG b/screenshots/opera/screen_2.JPG
new file mode 100644
index 0000000..a08f6b3
Binary files /dev/null and b/screenshots/opera/screen_2.JPG differ
diff --git a/screenshots/opera/screen_3.JPG b/screenshots/opera/screen_3.JPG
new file mode 100644
index 0000000..6410ab9
Binary files /dev/null and b/screenshots/opera/screen_3.JPG differ