mirror of https://github.com/gorhill/uBlock.git
prepend vapi-usercss.js to contentscript.js in extension package
This commit is contained in:
parent
ed5dba432a
commit
23487a643a
|
@ -38,7 +38,7 @@
|
||||||
"content_scripts": [
|
"content_scripts": [
|
||||||
{
|
{
|
||||||
"matches": ["http://*/*", "https://*/*"],
|
"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",
|
"run_at": "document_start",
|
||||||
"all_frames": true
|
"all_frames": true
|
||||||
},
|
},
|
||||||
|
|
|
@ -566,7 +566,6 @@ var contentObserver = {
|
||||||
let sandbox = this.initContentScripts(win, true);
|
let sandbox = this.initContentScripts(win, true);
|
||||||
try {
|
try {
|
||||||
lss(this.contentBaseURI + 'vapi-client.js', sandbox);
|
lss(this.contentBaseURI + 'vapi-client.js', sandbox);
|
||||||
lss(this.contentBaseURI + 'vapi-usercss.js', sandbox);
|
|
||||||
lss(this.contentBaseURI + 'contentscript.js', sandbox);
|
lss(this.contentBaseURI + 'contentscript.js', sandbox);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
//console.exception(ex.msg, ex.stack);
|
//console.exception(ex.msg, ex.stack);
|
||||||
|
|
|
@ -38,7 +38,6 @@
|
||||||
],
|
],
|
||||||
"js":[
|
"js":[
|
||||||
"js/vapi-client.js",
|
"js/vapi-client.js",
|
||||||
"js/vapi-usercss.js",
|
|
||||||
"js/contentscript.js"
|
"js/contentscript.js"
|
||||||
],
|
],
|
||||||
"run_at":"document_start",
|
"run_at":"document_start",
|
||||||
|
|
|
@ -24,6 +24,13 @@ cp platform/chromium/*.html $DES/
|
||||||
cp platform/chromium/*.json $DES/
|
cp platform/chromium/*.json $DES/
|
||||||
cp LICENSE.txt $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..."
|
echo "*** uBlock0.chromium: Generating meta..."
|
||||||
python tools/make-chromium-meta.py $DES/
|
python tools/make-chromium-meta.py $DES/
|
||||||
|
|
||||||
|
|
|
@ -31,6 +31,13 @@ cp platform/firefox/install.rdf $DES/
|
||||||
cp platform/firefox/*.xul $DES/
|
cp platform/firefox/*.xul $DES/
|
||||||
cp LICENSE.txt $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..."
|
echo "*** uBlock0.firefox: Generating meta..."
|
||||||
python tools/make-firefox-meta.py $DES/
|
python tools/make-firefox-meta.py $DES/
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,13 @@ cp platform/webext/vapi-usercss.js $DES/js/
|
||||||
rm $DES/options_ui.html
|
rm $DES/options_ui.html
|
||||||
rm $DES/js/options_ui.js
|
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..."
|
echo "*** uBlock0.webext: Generating meta..."
|
||||||
python tools/make-webext-meta.py $DES/
|
python tools/make-webext-meta.py $DES/
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue