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
|
||||
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.
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue