diff --git a/build-js.sh b/build-js.sh index 37ec98d..5144fc8 100644 --- a/build-js.sh +++ b/build-js.sh @@ -4,7 +4,9 @@ cp -r src/lib/* build/lib/ cp -r src/decoder.json build/ rm -rf build/injections/* mkdir -p build/src/injections + uglifyjs build/image-decoder.js --compress --screw-ie8 --define --keep-fnames -o build/image-decoder.js for f in src/injections/*; do uglifyjs "build/image-decoder.js" "src/lib/jquery.js" $f --compress --screw-ie8 --define --stats --keep-fnames -o build/$f; done + cp -rp build/src/* build/ rm -rf build/src \ No newline at end of file diff --git a/firefox/index.js b/firefox/index.js index 641421d..57076e6 100644 --- a/firefox/index.js +++ b/firefox/index.js @@ -6,7 +6,6 @@ for (var i = 0; i < sites.length; i++) { site = Object.keys(sites[i]); script = sites[i][site]; site = '*.' + site; - console.log("SS: " + site + " " + script); pageMod.PageMod({ include: site, contentScriptFile: './injections/' + script, diff --git a/firefox/package.json b/firefox/package.json index a54314f..4e4c853 100644 --- a/firefox/package.json +++ b/firefox/package.json @@ -1,14 +1,14 @@ { - "author": "TheOrangeOne", - "description": "Use hipchat emoticons on other sites", + "author": "TheOrangeOne", + "description": "Use hipchat emoticons on other sites", "engines": { - "fennec": ">=38.0a1", + "fennec": ">=38.0a1", "firefox": ">=38.0a1" - }, - "id": "Hipchat-Emoticons-for-all@jetpack", - "license": "MIT", - "main": "index.js", - "name": "hipchat emoticons for all", - "title": "Hipchat-Emoticons-for-all", + }, + "id": "Hipchat-Emoticons-for-all@jetpack", + "license": "MIT", + "main": "index.js", + "name": "hipchat emoticons for all", + "title": "Hipchat-Emoticons-for-all", "version": "0.0.0" } \ No newline at end of file diff --git a/package.json b/package.json index a262afd..0e15f1c 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "description": "Use hipchat emoticons on other sites", "main": "src/index.js", "scripts": { - "create-dirs": "mkdir -p firefox/data chrome/data build/injections", + "create-dirs": "mkdir -p firefox/data chrome/data build/injections build/lib", "build-extensions": "npm run build-firefox && npm run build-chrome", "build-firefox": "cd firefox/ && jpm xpi && cd -", "build-chrome": "crx pack chrome -o chrome/hipchat-emoticons-for-all.crx -p chrome/key.pem", diff --git a/src/image-decoder.js b/src/image-decoder.js index 02ed8ce..28d38a7 100644 --- a/src/image-decoder.js +++ b/src/image-decoder.js @@ -4,12 +4,13 @@ function inject_image(ident, classes) { for (var i = 0; i < image_decoder.length; i++) { key = Object.keys(image_decoder[i]); image = image_decoder[key]; - $(this).html($(this).html().replace( - key, + $(this).html($(this).html().replace(key, "" )); } }); } +console.log("Injection"); + var image_decoder = %image_decoder% \ No newline at end of file