Redirect to placeholder CSS file for blocked Google Fonts (#763)

This commit is contained in:
nobody 2021-11-10 06:14:57 +01:00
parent 0f6f3f2bcf
commit e030872084
No known key found for this signature in database
GPG Key ID: 8F6DE3D614FCFD7A
3 changed files with 9 additions and 1 deletions

View File

@ -61,7 +61,7 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
// Check if the website is allowed to load Google Fonts
if (interceptor.blockGoogleFonts === true && isListed === false) {
return {
'cancel': true
'redirectUrl': chrome.runtime.getURL('resources/placeholder.css')
};
} else if (interceptor.blockGoogleFonts === false || isListed === true) {
return {

View File

@ -28,6 +28,7 @@
<p>Improved</p>
<ul>
<li>Correct redirection for jquery-latest.js and code.jquery.com (<a href="https://codeberg.org/nobody/LocalCDN/issues/761">#761</a>)</li>
<li>Redirect to placeholder CSS file for blocked Google Fonts (<a href="https://codeberg.org/nobody/LocalCDN/issues/763">#763</a>)</li>
</ul>
<p>Added</p>
<ul>

View File

@ -0,0 +1,7 @@
/*
* Just a placeholder for Google Fonts requests
* Belongs to LocalCDN
*
* @author nobody
* @since 2021-11-10
*/