prepend vapi-usercss.js to contentscript.js in extension package

This commit is contained in:
gorhill 2017-10-24 12:40:58 -04:00
parent ed5dba432a
commit 23487a643a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
6 changed files with 22 additions and 3 deletions

View File

@ -38,7 +38,7 @@
"content_scripts": [
{
"matches": ["http://*/*", "https://*/*"],
"js": ["js/vapi-client.js", "js/vapi-usercss.js", "js/contentscript.js"],
"js": ["js/vapi-client.js", "js/contentscript.js"],
"run_at": "document_start",
"all_frames": true
},

View File

@ -566,7 +566,6 @@ var contentObserver = {
let sandbox = this.initContentScripts(win, true);
try {
lss(this.contentBaseURI + 'vapi-client.js', sandbox);
lss(this.contentBaseURI + 'vapi-usercss.js', sandbox);
lss(this.contentBaseURI + 'contentscript.js', sandbox);
} catch (ex) {
//console.exception(ex.msg, ex.stack);

View File

@ -38,7 +38,6 @@
],
"js":[
"js/vapi-client.js",
"js/vapi-usercss.js",
"js/contentscript.js"
],
"run_at":"document_start",

View File

@ -24,6 +24,13 @@ cp platform/chromium/*.html $DES/
cp platform/chromium/*.json $DES/
cp LICENSE.txt $DES/
echo "*** uBlock0.chromium: concatenating content scripts"
cat $DES/js/vapi-usercss.js > /tmp/contentscript.js
echo >> /tmp/contentscript.js
grep -v "^'use strict';$" $DES/js/contentscript.js >> /tmp/contentscript.js
mv /tmp/contentscript.js $DES/js/contentscript.js
rm $DES/js/vapi-usercss.js
echo "*** uBlock0.chromium: Generating meta..."
python tools/make-chromium-meta.py $DES/

View File

@ -31,6 +31,13 @@ cp platform/firefox/install.rdf $DES/
cp platform/firefox/*.xul $DES/
cp LICENSE.txt $DES/
echo "*** uBlock0.firefox: concatenating content scripts"
cat $DES/js/vapi-usercss.js > /tmp/contentscript.js
echo >> /tmp/contentscript.js
grep -v "^'use strict';$" $DES/js/contentscript.js >> /tmp/contentscript.js
mv /tmp/contentscript.js $DES/js/contentscript.js
rm $DES/js/vapi-usercss.js
echo "*** uBlock0.firefox: Generating meta..."
python tools/make-firefox-meta.py $DES/

View File

@ -32,6 +32,13 @@ cp platform/webext/vapi-usercss.js $DES/js/
rm $DES/options_ui.html
rm $DES/js/options_ui.js
echo "*** uBlock0.webext: concatenating content scripts"
cat $DES/js/vapi-usercss.js > /tmp/contentscript.js
echo >> /tmp/contentscript.js
grep -v "^'use strict';$" $DES/js/contentscript.js >> /tmp/contentscript.js
mv /tmp/contentscript.js $DES/js/contentscript.js
rm $DES/js/vapi-usercss.js
echo "*** uBlock0.webext: Generating meta..."
python tools/make-webext-meta.py $DES/