Skip to content
This repository has been archived by the owner on Oct 24, 2020. It is now read-only.

Commit

Permalink
Merge pull request #9 from NanoAdblocker/master
Browse files Browse the repository at this point in the history
v1.0.0.57
  • Loading branch information
LiCybora authored Jul 18, 2018
2 parents 3753915 + 5ae6c2f commit f11e4c6
Show file tree
Hide file tree
Showing 16 changed files with 83 additions and 92 deletions.
6 changes: 3 additions & 3 deletions dist/firefox/updates.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
"[email protected]": {
"updates": [
{
"version": "1.16.11.102",
"version": "1.16.13.101",
"applications": { "gecko": { "strict_min_version": "52" } },
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.16.11rc2",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.16.11rc2/uBlock0.firefox.signed.xpi"
"update_info_url": "https://github.com/gorhill/uBlock/releases/tag/1.16.13rc1",
"update_link": "https://github.com/gorhill/uBlock/releases/download/1.16.13rc1/uBlock0.firefox.signed.xpi"
}
]
}
Expand Down
2 changes: 1 addition & 1 deletion dist/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.16.12
1.16.14
6 changes: 3 additions & 3 deletions src/_locales/cs/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
"description": "English: Apply changes"
},
"3pGroupDefault": {
"message": "Interní",
"message": "Integrované",
"description": "Header for the uBlock filters section in 'Filter lists pane'"
},
"3pGroupAds": {
Expand Down Expand Up @@ -388,7 +388,7 @@
"description": "The label for the checkbox used to import external filter lists"
},
"3pExternalListsHint": {
"message": "Jedna URL adresa na řádek. Řádky začínající vykřičníkem „!“ budou ignorovány. Neplatné URL adresy budou tiše ignorovány.",
"message": "Jedna URL adresa na řádek. Neplatné URL adresy budou tiše ignorovány.",
"description": "Short information about how to use the textarea to import external filter lists by URL"
},
"3pExternalListObsolete": {
Expand Down Expand Up @@ -600,7 +600,7 @@
"description": "A link for where to get support"
},
"aboutIssues": {
"message": "Issue tracker",
"message": "Evidence problémů",
"description": "Text for a link to official issue tracker"
},
"aboutCode": {
Expand Down
20 changes: 10 additions & 10 deletions src/_locales/fil/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@
"description": "English: Click: disable\/enable uBlock₀ for this site.\n\nCtrl+click: disable uBlock₀ only on this page."
},
"popupPowerSwitchInfo1": {
"message": "Click to disable uBlock₀ for this site.\n\nCtrl+click to disable uBlock₀ only on this page.",
"message": "Click: paganahin ang uBlock₀ para sa websayt na ito.\n\nCtrl+click: 'wag paganahin ang uBlock₀ para lang sa pahina na to.",
"description": "Message to be read by screen readers"
},
"popupPowerSwitchInfo2": {
"message": "Click to enable uBlock₀ for this site.",
"message": "Click para paganahin ang uBlock₀ sa websayt na ito.",
"description": "Message to be read by screen readers"
},
"popupBlockedRequestPrompt": {
Expand Down Expand Up @@ -96,47 +96,47 @@
"description": "Tooltip for the no-popups per-site switch"
},
"popupTipNoPopups1": {
"message": "Click to block all popups on this site",
"message": "Click para ihinto ang lahat ng popups sa websayt na ito",
"description": "Tooltip for the no-popups per-site switch"
},
"popupTipNoPopups2": {
"message": "Click to no longer block all popups on this site",
"message": "Click para hindi na ihinto ang lahat ng popups sa websayt na ito",
"description": "Tooltip for the no-popups per-site switch"
},
"popupTipNoLargeMedia": {
"message": "Palit-ayos sa paghalang ng mga malaking media element sa site",
"description": "Tooltip for the no-large-media per-site switch"
},
"popupTipNoLargeMedia1": {
"message": "Click to block large media elements on this site",
"message": "Click para ihinto ang may malalaking media elements sa website na ito",
"description": "Tooltip for the no-large-media per-site switch"
},
"popupTipNoLargeMedia2": {
"message": "Click to no longer block large media elements on this site",
"message": "Click para ihinto ang may malalaking media elements sa websayt na ito",
"description": "Tooltip for the no-large-media per-site switch"
},
"popupTipNoCosmeticFiltering": {
"message": "Palit-ayos ng panala ng itsura para sa site na ito",
"description": "Tooltip for the no-cosmetic-filtering per-site switch"
},
"popupTipNoCosmeticFiltering1": {
"message": "Click to disable cosmetic filtering on this site",
"message": "Click para ihinto ang cosmetic filtering sa websayt na ito",
"description": "Tooltip for the no-cosmetic-filtering per-site switch"
},
"popupTipNoCosmeticFiltering2": {
"message": "Click to enable cosmetic filtering on this site",
"message": "Click para hindi ihinto ang cosmetic filtering sa websayt na ito",
"description": "Tooltip for the no-cosmetic-filtering per-site switch"
},
"popupTipNoRemoteFonts": {
"message": "Palit-ayos sa paghalang ng malayuang itsura ng titik para sa site na ito",
"description": "Tooltip for the no-remote-fonts per-site switch"
},
"popupTipNoRemoteFonts1": {
"message": "Click to block remote fonts on this site",
"message": "Click para ihinto ang remote fonts sa websayt na ito",
"description": "Tooltip for the no-remote-fonts per-site switch"
},
"popupTipNoRemoteFonts2": {
"message": "Click to no longer block remote fonts on this site",
"message": "Click para hindi na ihinto ang remote fonts sa websayt na ito",
"description": "Tooltip for the no-remote-fonts per-site switch"
},
"popupTipGlobalRules": {
Expand Down
4 changes: 2 additions & 2 deletions src/_locales/it/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"description": "English: or"
},
"popupTipDashboard": {
"message": "Aprire il cruscotto",
"message": "Apri la dashboard",
"description": "English: Click to open the dashboard"
},
"popupTipZapper": {
Expand Down Expand Up @@ -264,7 +264,7 @@
"description": "English: "
},
"settingsHyperlinkAuditingDisabledPrompt": {
"message": "Disattivare l' auditing del collegamento ipertestuale",
"message": "Disattivare l'auditing del collegamento ipertestuale",
"description": "English: "
},
"settingsWebRTCIPAddressHiddenPrompt": {
Expand Down
6 changes: 3 additions & 3 deletions src/_locales/te/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
"description": "English: Apply changes"
},
"3pGroupDefault": {
"message": "Built-in",
"message": "అంతర్నిర్మితం",
"description": "Header for the uBlock filters section in 'Filter lists pane'"
},
"3pGroupAds": {
Expand Down Expand Up @@ -384,7 +384,7 @@
"description": "English: Custom"
},
"3pImport": {
"message": "Import...",
"message": "దిగుమతించు...",
"description": "The label for the checkbox used to import external filter lists"
},
"3pExternalListsHint": {
Expand Down Expand Up @@ -600,7 +600,7 @@
"description": "A link for where to get support"
},
"aboutIssues": {
"message": "Issue tracker",
"message": "ఇష్యూ ట్రాకర్",
"description": "Text for a link to official issue tracker"
},
"aboutCode": {
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/vi/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@
"description": "Short information about how to use the textarea to import external filter lists by URL"
},
"3pExternalListObsolete": {
"message": "đã",
"message": "Đã.",
"description": "used as a tooltip for the out-of-date icon beside a list"
},
"3pLastUpdate": {
Expand Down
4 changes: 2 additions & 2 deletions src/_locales/zh_CN/messages.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"description": "this will be in the chrome web store: must be 132 characters or less"
},
"dashboardName": {
"message": "uBlock₀ 控制面板",
"message": "uBlock₀ 控制面板",
"description": "English: uBlock₀ — Dashboard"
},
"settingsPageName": {
Expand All @@ -32,7 +32,7 @@
"description": "appears as tab name in dashboard"
},
"statsPageName": {
"message": "uBlock₀ 网络请求日志",
"message": "uBlock₀ 网络请求日志",
"description": "Title for the logger window"
},
"aboutPageName": {
Expand Down
2 changes: 1 addition & 1 deletion src/_locales/zh_TW/messages.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"extName": {
"message": "uBlock Origin",
"message": "uBlock",
"description": "extension name."
},
"extShortDesc": {
Expand Down
6 changes: 6 additions & 0 deletions src/js/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,13 @@ api.fetchFilterList = function(mainlistURL, onLoad, onError) {
onLoad(details);
};

// https://github.com/AdguardTeam/FiltersRegistry/issues/82
// Not checking for `errored` status was causing repeated notifications
// to the caller. This can happen when more than one out of multiple
// sublists can't be fetched.
var onLocalLoadError = function(details) {
if ( errored ) { return; }

errored = true;
details.url = mainlistURL;
details.content = '';
Expand Down
53 changes: 25 additions & 28 deletions src/js/codemirror/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,31 +79,27 @@
);
}

function searchWidgetTimerHandler(cm) {
var state = getSearchState(cm);
state.queryTimer = null;
findCommit(cm);
}

function searchWidgetInputHandler(cm) {
var state = getSearchState(cm);
if ( queryTextFromSearchWidget(cm) !== state.queryText ) {
if ( state.queryTimer !== null ) {
clearTimeout(state.queryTimer);
}
state.queryTimer = setTimeout(
searchWidgetTimerHandler.bind(null, cm),
350
);
let state = getSearchState(cm);
if ( queryTextFromSearchWidget(cm) === state.queryText ) { return; }
if ( state.queryTimer !== null ) {
clearTimeout(state.queryTimer);
}
state.queryTimer = setTimeout(
() => {
state.queryTimer = null;
findCommit(cm, 0);
},
350
);
}

function searchWidgetClickHandler(cm, ev) {
var tcl = ev.target.classList;
if ( tcl.contains('cm-search-widget-up') ) {
findNext(cm, true);
findNext(cm, -1);
} else if ( tcl.contains('cm-search-widget-down') ) {
findNext(cm, false);
findNext(cm, 1);
}
if ( ev.target.localName !== 'input' ) {
ev.preventDefault();
Expand Down Expand Up @@ -156,7 +152,7 @@
return true;
}
if ( queryText.length !== 0 ) {
findNext(cm, command === 'findPrev');
findNext(cm, command === 'findPrev' ? -1 : 1);
}
return true;
}
Expand Down Expand Up @@ -223,22 +219,23 @@
}
}

function findNext(cm, rev, callback) {
function findNext(cm, dir, callback) {
cm.operation(function() {
var state = getSearchState(cm);
if ( !state.query ) { return; }
var cursor = getSearchCursor(
cm,
state.query,
rev ? cm.getCursor('from') : cm.getCursor('to')
dir <= 0 ? cm.getCursor('from') : cm.getCursor('to')
);
if (!cursor.find(rev)) {
let previous = dir < 0;
if (!cursor.find(previous)) {
cursor = getSearchCursor(
cm,
state.query,
rev ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0)
previous ? CodeMirror.Pos(cm.lastLine()) : CodeMirror.Pos(cm.firstLine(), 0)
);
if (!cursor.find(rev)) return;
if (!cursor.find(previous)) return;
}
cm.setSelection(cursor.from(), cursor.to());
cm.scrollIntoView({from: cursor.from(), to: cursor.to()}, 20);
Expand Down Expand Up @@ -270,7 +267,7 @@
});
}

function findCommit(cm) {
function findCommit(cm, dir) {
var state = getSearchState(cm);
if ( state.queryTimer !== null ) {
clearTimeout(state.queryTimer);
Expand All @@ -284,7 +281,7 @@
} else {
cm.operation(function() {
startSearch(cm, state);
findNext(cm, false);
findNext(cm, dir);
});
}
}
Expand All @@ -300,17 +297,17 @@
cm.setCursor(word.anchor);
}
queryTextToSearchWidget(cm, queryText);
findCommit(cm);
findCommit(cm, 1);
}

function findNextCommand(cm) {
var state = getSearchState(cm);
if ( state.query ) { return findNext(cm, false); }
if ( state.query ) { return findNext(cm, 1); }
}

function findPrevCommand(cm) {
var state = getSearchState(cm);
if ( state.query ) { return findNext(cm, true); }
if ( state.query ) { return findNext(cm, -1); }
}

CodeMirror.commands.find = findCommand;
Expand Down
2 changes: 2 additions & 0 deletions src/js/cosmetic-filtering.js
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,9 @@ FilterContainer.prototype.freeze = function() {
}
}
this.highlyGeneric.simple.str = Array.from(this.highlyGeneric.simple.dict).join(',\n');
this.highlyGeneric.simple.mru.reset();
this.highlyGeneric.complex.str = Array.from(this.highlyGeneric.complex.dict).join(',\n');
this.highlyGeneric.complex.mru.reset();

this.frozen = true;
};
Expand Down
8 changes: 2 additions & 6 deletions src/js/messaging.js
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,6 @@ var onMessage = function(request, sender, callback) {

case 'cosmeticFiltersInjected':
µb.cosmeticFilteringEngine.addToSelectorCache(request);
// Net-based cosmetic filters are of no interest for logging purpose.
if ( µb.logger.isEnabled() && request.type !== 'net' ) {
µb.logCosmeticFilters(tabId);
}
break;

case 'createUserFilter':
Expand Down Expand Up @@ -539,8 +535,8 @@ var onMessage = function(request, sender, callback) {
if ( µb.canInjectScriptletsNow === false ) {
response.scriptlets = µb.scriptletFilteringEngine.retrieve(request);
}
if ( request.isRootFrame && µb.logger.isEnabled() ) {
µb.logCosmeticFilters(tabId);
if ( response.noCosmeticFiltering !== true ) {
µb.logCosmeticFilters(tabId, frameId);
}
break;

Expand Down
Loading

0 comments on commit f11e4c6

Please sign in to comment.