After getting a clue from this post Post
I am trying to remove a Listener (which has blocked the URL using webRequest api) to unblock the URL. But I am not able to remove it successfully, I am doing something like this...
To block the URL
chrome.webRequest.onBeforeRequest.addListener( function blockListener (details) {
return {
cancel: true
};
},{ urls: [url], types: [ 'main_frame' ] }, ['blocking'] );
To unblock the URL
chrome.webRequest.onBeforeRequest.removeListener(blockListener);
What am I doing wrong?