1
0
mirror of https://github.com/gorhill/uBlock.git synced 2024-09-18 17:02:27 +02:00

code review

This commit is contained in:
gorhill 2015-03-06 00:06:25 -05:00
parent d3060588a6
commit d376c69e2f

View File

@ -412,9 +412,9 @@ var elementsFromFilter = function(filter) {
// One idea is to normalize all a[href] on the page, but for now I will // One idea is to normalize all a[href] on the page, but for now I will
// wait and see, as I prefer to refrain from tampering with the page // wait and see, as I prefer to refrain from tampering with the page
// content if I can avoid it. // content if I can avoid it.
if ( filter.slice(0, 2) === '##' ) { if ( filter.lastIndexOf('##', 0) === 0 ) {
try { try {
out = document.querySelectorAll(filter.replace('##', '')); out = document.querySelectorAll(filter.slice(2));
} }
catch (e) { catch (e) {
} }