code review

This commit is contained in:
gorhill 2015-03-06 00:06:25 -05:00
parent d3060588a6
commit d376c69e2f
1 changed files with 2 additions and 2 deletions

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
// wait and see, as I prefer to refrain from tampering with the page
// content if I can avoid it.
if ( filter.slice(0, 2) === '##' ) {
if ( filter.lastIndexOf('##', 0) === 0 ) {
try {
out = document.querySelectorAll(filter.replace('##', ''));
out = document.querySelectorAll(filter.slice(2));
}
catch (e) {
}