Skip to content

Commit

Permalink
Update to 1.8.0 (berrberr#533)
Browse files Browse the repository at this point in the history
* Update to 1.8.0. Change prod build to not uglify per chrome extension
updated standards & fix manifest warnings.

* Fix Jango controller to reference new elements (berrberr#538)

Co-authored-by: The Worldly Monkey <[email protected]>
  • Loading branch information
berrberr and lorumic authored Dec 31, 2019
1 parent c63b3a0 commit f8560d2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 22 deletions.
12 changes: 3 additions & 9 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = function(grunt) {

var pkg = grunt.file.readJSON("package.json"),
mnf = grunt.file.readJSON("code/manifest.json"),
fileMaps = { browserify: {}, uglify: {} },
fileMaps = { browserify: {} },
jsFiles = grunt.file.expand(["code/js/**/*.js", "!code/js/lib/*"]),
htmlFiles = grunt.file.expand(["code/html/*.html", "code/css/*"]),
file,
Expand All @@ -11,7 +11,6 @@ module.exports = function(grunt) {
for (var i = 0; i < files.length; i++) {
var file = files[i];
fileMaps.browserify["build/unpacked-dev/js/" + file] = "code/js/" + file;
fileMaps.uglify["build/unpacked-prod/js/" + file] = "build/unpacked-dev/js/" + file;
}

grunt.initConfig({
Expand All @@ -32,7 +31,7 @@ module.exports = function(grunt) {
prod: { files: [ {
expand: true,
cwd: "build/unpacked-dev/",
src: ["**", "!js/*.js"],
src: ["**"],
dest: "build/unpacked-prod/"
} ] },
artifact: { files: [ {
Expand Down Expand Up @@ -67,10 +66,6 @@ module.exports = function(grunt) {
}
},

uglify: {
min: { files: fileMaps.uglify }
},

watch: {
files: jsFiles.concat(htmlFiles),
tasks: ["dev"]
Expand Down Expand Up @@ -106,7 +101,6 @@ module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-contrib-copy");
grunt.loadNpmTasks("grunt-contrib-clean");
grunt.loadNpmTasks("grunt-contrib-watch");
grunt.loadNpmTasks("grunt-contrib-uglify");
grunt.loadNpmTasks("grunt-sass");
grunt.loadNpmTasks("grunt-exec");
grunt.loadNpmTasks("grunt-mkdir");
Expand Down Expand Up @@ -134,5 +128,5 @@ module.exports = function(grunt) {
grunt.registerTask("dev-pre", ["jshint", "lintspaces", "clean", "mkdir:unpacked", "sass:dev", "copy:main", "manifest"]);
grunt.registerTask("dev", ["dev-pre", "browserify"]);

grunt.registerTask("rel", ["jshint", "lintspaces", "clean", "mkdir:unpacked", "sass:prod", "copy:main", "manifest", "browserify", "copy:prod", "uglify"]);
grunt.registerTask("rel", ["jshint", "lintspaces", "clean", "mkdir:unpacked", "sass:prod", "copy:main", "manifest", "browserify", "copy:prod"]);
};
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Streamkeys v1.7.8 [![Build Status](https://travis-ci.org/berrberr/streamkeys.svg?branch=master)](https://travis-ci.org/berrberr/streamkeys)
# Streamkeys v1.8.0 [![Build Status](https://travis-ci.org/berrberr/streamkeys.svg?branch=master)](https://travis-ci.org/berrberr/streamkeys)

Chrome extension to send "global" (ie. across the browser) hotkeys to various online media players.

Expand Down
14 changes: 7 additions & 7 deletions code/js/controllers/JangoController.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@

new BaseController({
siteName: "Jango",
playPause: "#btn-playpause",
playNext: "#btn-ff",
like: "#btn-fav",
dislike: "#player_ban",
playPause: "#player_play",
playNext: "#player_skip",
like: "#player_thumbs_up",
dislike: "#player_thumbs_down",

playState: "#btn-playpause.pause",
song: "#current-song",
artist: "#player_current_artist > a"
playState: "#player_play.player_pause",
song: "#song_info > span",
artist: "#album_info > span > a"
});
})();
2 changes: 1 addition & 1 deletion code/js/controllers/PrimevideoController.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* Prime Video does not use button clicks, rather, it uses pointer events to handle both mouse and
* touch events simultaneously.
*/
controller.playPause =function() {
controller.playPause = function() {
try {
const element = this.doc().querySelector(this.selectors.playPause);

Expand Down
3 changes: 1 addition & 2 deletions code/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"js/controllers/*"
],
"permissions": ["tabs", "storage", "http://*/*", "https://*/*"],
"optional_permissions": [ "notifications", "http://*/*", "https://*/*",
"nativeMessaging"],
"optional_permissions": [ "notifications", "nativeMessaging"],
"commands": {
"playPause": {
"suggested_key": {
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Streamkeys",
"version": "1.7.8",
"version": "1.8.0",
"description": "Global hotkeys for online music players including support for media keys.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -50,7 +50,6 @@
"grunt-contrib-clean": "^2.0.0",
"grunt-contrib-copy": "^1.0.0",
"grunt-contrib-jshint": "^2.1.0",
"grunt-contrib-uglify": "^4.0.1",
"grunt-karma": "^3.0.2",
"grunt-lintspaces": "^0.8.6",
"grunt-mkdir": "^1.0.0",
Expand Down

0 comments on commit f8560d2

Please sign in to comment.