I have a support chrome extension as a workaround to a custom website to get information from it. I am trying to determine the redirect link of each line in a table as it does not have a normal href to the react table.
Looking at the code, I have determined that the page is redirected once the screen x/y position on the screen is clicked to perform an action. This then goes through the inherent script on the website to obtain an ID/Link based on that position to provide the link.
After the following section, the rest of it is minified React.
export function _onClick(_ref) { //_ref = MouseEvent {isTrusted: true, screenX: 1230, screenY: 458, clientX: 201, clientY: 332, …}
var target = _ref.target; //target = td.col-xs-2 {__reactInternalInstance$db9spb3eyf: At, __reactEventHandlers$db9spb3eyf: {…}, colSpan: 1, rowSpan: 1, headers: "", …}
store.activate([].concat(_toConsumableArray(store.getInstances())).reduce(domHelpers.findContainerNodes(target), []).sort(domHelpers.sortByDOMPosition).map(function (item) { //target = td.col-xs-2 {__reactInternalInstance$db9spb3eyf: At, __reactEventHandlers$db9spb3eyf: {…}, colSpan: 1, rowSpan: 1, headers: "", …}
return item.instance;
}));
}
With that said, one of the purposes of the chrome extension is to obtain all of the links that it redirects to on the page (Each row of the table gets redirected without displaying the href link in the table). Since it does not have a simple href link attached to a button I am having a hard time determining how to grab the link and without redirecting to the page itself.
I attempted something like this but it did not obtain the information I need without redirecting.
window.onclick = function(e) {
console.log(e);
};
Any help would be much appreciated. Thank You
Added some new content to try and help with getting the webRequest but doesn't seem to work in the manifest.js.
"content_security_policy": "script-src 'self' 'unsafe-eval'; object-src 'self'",
"permissions": [
"webRequest",
"*://*.example.com/",
"webRequestBlocking"
],