mirror of
https://github.com/zero-peak/ZeroOmega.git
synced 2025-01-22 15:08:12 -05:00
Ignore about: and moz- URLs in a few places.
This commit is contained in:
parent
35cdb7ed6b
commit
d65c29f34d
@ -288,8 +288,12 @@ encodeError = (obj) ->
|
||||
refreshActivePageIfEnabled = ->
|
||||
return if localStorage['omega.local.refreshOnProfileChange'] == 'false'
|
||||
chrome.tabs.query {active: true, lastFocusedWindow: true}, (tabs) ->
|
||||
if tabs[0].url and tabs[0].url.substr(0, 6) != 'chrome'
|
||||
chrome.tabs.reload(tabs[0].id, {bypassCache: true})
|
||||
url = tabs[0].url
|
||||
return if not url
|
||||
return if url.substr(0, 6) == 'chrome'
|
||||
return if url.substr(0, 6) == 'about:'
|
||||
return if url.substr(0, 4) == 'moz-'
|
||||
chrome.tabs.reload(tabs[0].id, {bypassCache: true})
|
||||
|
||||
chrome.runtime.onMessage.addListener (request, sender, respond) ->
|
||||
options.ready.then ->
|
||||
|
@ -40,7 +40,8 @@ angular.module('omegaTarget', []).factory 'omegaTarget', ($q) ->
|
||||
port.onMessage.addListener(callback)
|
||||
return
|
||||
|
||||
isChromeUrl = (url) -> url.substr(0, 6) == 'chrome'
|
||||
isChromeUrl = (url) -> url.substr(0, 6) == 'chrome' or
|
||||
url.substr(0, 4) == 'moz-' or url.substr(0, 6) == 'about:'
|
||||
|
||||
optionsChangeCallback = []
|
||||
requestInfoCallback = null
|
||||
|
@ -201,8 +201,12 @@ class ChromeOptions extends OmegaTarget.Options
|
||||
index = (index + 1) % profiles.length
|
||||
@applyProfile(profiles[index]).then =>
|
||||
if @_options['-refreshOnProfileChange']
|
||||
if tab.url and tab.url.indexOf('chrome') != 0
|
||||
chrome.tabs.reload(tab.id)
|
||||
url = tab.url
|
||||
return if not url
|
||||
return if url.substr(0, 6) == 'chrome'
|
||||
return if url.substr(0, 6) == 'about:'
|
||||
return if url.substr(0, 4) == 'moz-'
|
||||
chrome.tabs.reload(tab.id)
|
||||
else
|
||||
chrome.browserAction.setPopup({popup: 'popup/index.html'})
|
||||
Promise.resolve()
|
||||
@ -356,6 +360,8 @@ class ChromeOptions extends OmegaTarget.Options
|
||||
return result if not url
|
||||
else
|
||||
return result
|
||||
return result if url.substr(0, 6) == 'about:'
|
||||
return result if url.substr(0, 4) == 'moz-'
|
||||
domain = OmegaPac.getBaseDomain(Url.parse(url).hostname)
|
||||
|
||||
return {
|
||||
|
@ -89,6 +89,8 @@ module.exports = class WebRequestMonitor
|
||||
return if req.error.indexOf('net::ERR_FILE_') == 0
|
||||
return if req.url.indexOf('file:') == 0
|
||||
return if req.url.indexOf('chrome') == 0
|
||||
return if req.url.indexOf('about:') == 0
|
||||
return if req.url.indexOf('moz-') == 0
|
||||
# Some ad-blocking extensions may redirect requests to 127.0.0.1.
|
||||
return if req.url.indexOf('://127.0.0.1') > 0
|
||||
return unless reqInfo
|
||||
|
Loading…
Reference in New Issue
Block a user