mirror of
https://github.com/gorhill/uBlock.git
synced 2024-11-10 09:07:54 +01:00
Use Unicode version of hostnames in element picker
Related feedback: https://www.reddit.com/r/uBlockOrigin/comments/15vfkm6/
This commit is contained in:
parent
ed6c0d2f50
commit
55d068aca3
1 changed files with 5 additions and 1 deletions
|
@ -26,6 +26,7 @@
|
|||
import './codemirror/ubo-static-filtering.js';
|
||||
|
||||
import { hostnameFromURI } from './uri-utils.js';
|
||||
import punycode from '../lib/punycode.js';
|
||||
import * as sfp from './static-filtering-parser.js';
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -147,7 +148,10 @@ const renderRange = function(id, value, invert = false) {
|
|||
const userFilterFromCandidate = function(filter) {
|
||||
if ( filter === '' || filter === '!' ) { return; }
|
||||
|
||||
const hn = hostnameFromURI(docURL.href);
|
||||
let hn = hostnameFromURI(docURL.href);
|
||||
if ( hn.startsWith('xn--') ) {
|
||||
hn = punycode.toUnicode(hn);
|
||||
}
|
||||
|
||||
// Cosmetic filter?
|
||||
if ( reCosmeticAnchor.test(filter) ) {
|
||||
|
|
Loading…
Reference in a new issue