mirror of
https://codeberg.org/nobody/LocalCDN.git
synced 2025-06-05 21:49:31 +02:00
Redirect to placeholder CSS file for blocked Google Fonts (#763)
This commit is contained in:
@@ -61,7 +61,7 @@ interceptor.handleRequest = function (requestDetails, tabIdentifier, tab) {
|
|||||||
// Check if the website is allowed to load Google Fonts
|
// Check if the website is allowed to load Google Fonts
|
||||||
if (interceptor.blockGoogleFonts === true && isListed === false) {
|
if (interceptor.blockGoogleFonts === true && isListed === false) {
|
||||||
return {
|
return {
|
||||||
'cancel': true
|
'redirectUrl': chrome.runtime.getURL('resources/placeholder.css')
|
||||||
};
|
};
|
||||||
} else if (interceptor.blockGoogleFonts === false || isListed === true) {
|
} else if (interceptor.blockGoogleFonts === false || isListed === true) {
|
||||||
return {
|
return {
|
||||||
|
@@ -28,6 +28,7 @@
|
|||||||
<p>Improved</p>
|
<p>Improved</p>
|
||||||
<ul>
|
<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>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>
|
</ul>
|
||||||
<p>Added</p>
|
<p>Added</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
7
resources/placeholder.css
Normal file
7
resources/placeholder.css
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
/*
|
||||||
|
* Just a placeholder for Google Fonts requests
|
||||||
|
* Belongs to LocalCDN
|
||||||
|
*
|
||||||
|
* @author nobody
|
||||||
|
* @since 2021-11-10
|
||||||
|
*/
|
Reference in New Issue
Block a user