patch firefox/legacy for changes in e5f2e9701d

This commit is contained in:
Raymond Hill 2018-04-26 12:01:31 -04:00
parent e5f2e9701d
commit 9baf17fa2a
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
4 changed files with 16 additions and 6 deletions

View File

@ -28,5 +28,7 @@
// Chromium 66 and above supports user stylesheets: // Chromium 66 and above supports user stylesheets:
// https://github.com/gorhill/uBlock/issues/3588 // https://github.com/gorhill/uBlock/issues/3588
vAPI.supportsUserStylesheets = if ( typeof vAPI === 'object' ) {
/\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)/.test(navigator.userAgent); vAPI.supportsUserStylesheets =
/\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)/.test(navigator.userAgent);
}

View File

@ -28,5 +28,7 @@
// Chromium 66 and above supports user stylesheets: // Chromium 66 and above supports user stylesheets:
// https://github.com/gorhill/uBlock/issues/3588 // https://github.com/gorhill/uBlock/issues/3588
vAPI.supportsUserStylesheets = if ( typeof vAPI === 'object' ) {
/\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)|\bFirefox\/\d/.test(navigator.userAgent); vAPI.supportsUserStylesheets =
/\bChrom(?:e|ium)\/(?:6[6789]|[789]|1\d\d)|\bFirefox\/\d/.test(navigator.userAgent);
}

View File

@ -23,4 +23,6 @@
// User stylesheets are always supported with Firefox/webext . // User stylesheets are always supported with Firefox/webext .
vAPI.supportsUserStylesheets = true; if ( typeof vAPI === 'object' ) {
vAPI.supportsUserStylesheets = true;
}

View File

@ -22,6 +22,7 @@ cp platform/firefox/css/* $DES/css/
cp platform/firefox/polyfill.js $DES/js/ cp platform/firefox/polyfill.js $DES/js/
cp platform/firefox/vapi-*.js $DES/js/ cp platform/firefox/vapi-*.js $DES/js/
cp platform/chromium/vapi-usercss.real.js $DES/js/ cp platform/chromium/vapi-usercss.real.js $DES/js/
cp platform/webext/vapi-usercss.js $DES/js/
cp platform/firefox/bootstrap.js $DES/ cp platform/firefox/bootstrap.js $DES/
cp platform/firefox/processScript.js $DES/ cp platform/firefox/processScript.js $DES/
cp platform/firefox/frame*.js $DES/ cp platform/firefox/frame*.js $DES/
@ -32,10 +33,13 @@ cp platform/firefox/*.xul $DES/
cp LICENSE.txt $DES/ cp LICENSE.txt $DES/
echo "*** uBlock0.firefox: concatenating content scripts" echo "*** uBlock0.firefox: concatenating content scripts"
cat $DES/js/vapi-usercss.real.js > /tmp/contentscript.js cat $DES/js/vapi-usercss.js > /tmp/contentscript.js
echo >> /tmp/contentscript.js
grep -v "^'use strict';$" $DES/js/vapi-usercss.real.js >> /tmp/contentscript.js
echo >> /tmp/contentscript.js echo >> /tmp/contentscript.js
grep -v "^'use strict';$" $DES/js/contentscript.js >> /tmp/contentscript.js grep -v "^'use strict';$" $DES/js/contentscript.js >> /tmp/contentscript.js
mv /tmp/contentscript.js $DES/js/contentscript.js mv /tmp/contentscript.js $DES/js/contentscript.js
rm $DES/js/vapi-usercss.js
rm $DES/js/vapi-usercss.real.js rm $DES/js/vapi-usercss.real.js
echo "*** uBlock0.firefox: Generating meta..." echo "*** uBlock0.firefox: Generating meta..."