Chrome Extensions: Uncaught Error: Syntax error, unrecognized expression: a[href^=file://]
Hi there,
I have the following code for the chrome extension:
But I got the following error.
Does anybody knows what is the problem with this expression?
Code
- var flag = 'Chrome_LocalLinks_extension_was_already_injected_in_this_document';
- if (!document[flag])
- $('a[href^=file://]').
- live('mousedown', handleMousedownOnLink).
- live('mouseout', handleMouseoutOnLink).
- live('mouseup', handleMouseupOnLink).
- live('click', handleClickOnLink)
- document[flag] = true;
- }
Error In chrome debugger
Uncaught Error: Syntax error, unrecognized expression:
a[href^=file://]
ga.error @ jquery-2.1.4.min.js:2
ga.tokenize @ jquery-2.1.4.min.js:2
ga.select @ jquery-2.1.4.min.js:2
ga @ jquery-2.1.4.min.js:2
n.fn.extend.find @ jquery-2.1.4.min.js:2n.f
n.init @ jquery-2.1.4.min.js:2
n @ jquery-2.1.4.min.js:2
(anonymous function) @ locallinks_extension.js:16