How to get notified about changes of the history via history.pushState?

So now that HTML5 introduces history.pushState to change the browsers history, websites start using this in combination with Ajax instead of changing the fragment identifier of the URL. Sadly that means that those calls cannot be detect anymore by onhashchange. My question is: Is there a reliable way (hack? ;)) to detect when a website … Read more

What do {curly braces} around javascript variable name mean [duplicate]

This question already has answers here: What is this JavaScript syntax: {Ci, CC}? [duplicate] (2 answers) Closed 6 years ago. EDIT After looking at JSHint I found this ‘destructuring expression’ is available in ES6 (use esnext option) or Mozilla JS extensions (use moz) and this however after reading it I still don’t understand why it … Read more

How can I fix WebStorm warning “Unresolved function or method” for “require” (Firefox Add-on SDK)

I’m using WebStorm 7 for Firefox Add-on SDK development. WebStorm shows a warning: “Unresolved function or method” for require(). I want to get rid of the warning. var pageMod = require(“sdk/page-mod”); NOTE:I already configured JavaScript-library (refer /lib/sdk globals). Environment: WebStorm 7.0.2 Windows 7 64bit Firefox Add-on SDK 1.15beta1 13 Answers 13

Getting “net::ERR_BLOCKED_BY_CLIENT” error on some AJAX calls

Recently I’ve realised that, some adblocker extensions (such as adBlocker plus) block some Ajax calls. I get that error on the console: GET http://localhost/prj/conn.php?q=users/list/ net::ERR_BLOCKED_BY_CLIENT Why does it block some Ajax call but not the others and what causes that? Is there any workaround other than telling user to turn off adblocker? 11 Answers 11