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/
|
cp -r src/decoder.json build/
|
||||||
rm -rf build/injections/*
|
rm -rf build/injections/*
|
||||||
mkdir -p build/src/injections
|
mkdir -p build/src/injections
|
||||||
|
|
||||||
uglifyjs build/image-decoder.js --compress --screw-ie8 --define --keep-fnames -o build/image-decoder.js
|
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
|
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/
|
cp -rp build/src/* build/
|
||||||
rm -rf build/src
|
rm -rf build/src
|
|
@ -6,7 +6,6 @@ for (var i = 0; i < sites.length; i++) {
|
||||||
site = Object.keys(sites[i]);
|
site = Object.keys(sites[i]);
|
||||||
script = sites[i][site];
|
script = sites[i][site];
|
||||||
site = '*.' + site;
|
site = '*.' + site;
|
||||||
console.log("SS: " + site + " " + script);
|
|
||||||
pageMod.PageMod({
|
pageMod.PageMod({
|
||||||
include: site,
|
include: site,
|
||||||
contentScriptFile: './injections/' + script,
|
contentScriptFile: './injections/' + script,
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
"description": "Use hipchat emoticons on other sites",
|
"description": "Use hipchat emoticons on other sites",
|
||||||
"main": "src/index.js",
|
"main": "src/index.js",
|
||||||
"scripts": {
|
"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-extensions": "npm run build-firefox && npm run build-chrome",
|
||||||
"build-firefox": "cd firefox/ && jpm xpi && cd -",
|
"build-firefox": "cd firefox/ && jpm xpi && cd -",
|
||||||
"build-chrome": "crx pack chrome -o chrome/hipchat-emoticons-for-all.crx -p chrome/key.pem",
|
"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++) {
|
for (var i = 0; i < image_decoder.length; i++) {
|
||||||
key = Object.keys(image_decoder[i]);
|
key = Object.keys(image_decoder[i]);
|
||||||
image = image_decoder[key];
|
image = image_decoder[key];
|
||||||
$(this).html($(this).html().replace(
|
$(this).html($(this).html().replace(key,
|
||||||
key,
|
|
||||||
"<img class='" + classes + "' style='height: 30px; width: 30px;' src='" + image + "'/>"
|
"<img class='" + classes + "' style='height: 30px; width: 30px;' src='" + image + "'/>"
|
||||||
));
|
));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
console.log("Injection");
|
||||||
|
|
||||||
var image_decoder = %image_decoder%
|
var image_decoder = %image_decoder%
|
Reference in a new issue