I am using a click-to-call chrome extension that has a nasty habit of redirecting the call within the active window.
Obviously not the best for maintaining a workflow, and I'm not one to let an extension boss me around so I thought I'd make some tweaks, but have had no luck.
To my understanding, it should be as simple as changing window.location to window.open but it simply won't do anything once I make the change and reload it into chrome. Am I missing something?
chrome.storage.sync.get(['disabled', window.location.origin], function(result) {
checked = result.disabled;
chrome.runtime.onMessage.addListener(function(request) {
switch (request.type) {
case 'selectionVod':
window.location = ("votel://" + request.info.selectionText);
break;
case 'selectionVcc':
chrome.storage.sync.get(['vccPlatform'], function(result) {
var vccPlatform = result.vccPlatform;
if (vccPlatform && vccPlatform.includes('odcc')) {
window.location = ("https://" + vccPlatform + ".providerdomain.ca/AGUI/make_call.php?phone=" + request.info.selectionText);
} else {
window.location = ("https://vcc-" + vccPlatform + ".providerdomain.com/AGUI/make_call.php?phone=" + request.info.selectionText);
}
});```