Cleanup
This commit is contained in:
parent
bc468d61a9
commit
53a0f8d35e
5 changed files with 15 additions and 13 deletions
|
@ -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
|
|
@ -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,
|
||||
|
|
|
@ -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"
|
||||
}
|
|
@ -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",
|
||||
|
|
|
@ -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,
|
||||
"<img class='" + classes + "' style='height: 30px; width: 30px;' src='" + image + "'/>"
|
||||
));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
console.log("Injection");
|
||||
|
||||
var image_decoder = %image_decoder%
|
Reference in a new issue