mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
opt:block url logic
This commit is contained in:
parent
6e74c27ea2
commit
e91cc9021c
|
@ -21,7 +21,12 @@ void WebUrlRequestInterceptor::interceptRequest( QWebEngineUrlRequestInfo &info)
|
||||||
//whitelist url does not block
|
//whitelist url does not block
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(Utils::isHtmlResources(info.requestUrl())){
|
if( info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeImage
|
||||||
|
|| info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeFontResource
|
||||||
|
|| info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeStylesheet
|
||||||
|
|| info.resourceType() == QWebEngineUrlRequestInfo::ResourceTypeMedia
|
||||||
|
|| Utils::isHtmlResources( info.requestUrl() ) )
|
||||||
|
{
|
||||||
//let throuth the resources file.
|
//let throuth the resources file.
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue