|
|
@ -242,6 +242,15 @@ class Driver {
|
|
|
|
|
|
|
|
|
|
|
|
const reducedLinks = Array.prototype.reduce.call(
|
|
|
|
const reducedLinks = Array.prototype.reduce.call(
|
|
|
|
browser.links, (results, link) => {
|
|
|
|
browser.links, (results, link) => {
|
|
|
|
|
|
|
|
// Catch broken links.
|
|
|
|
|
|
|
|
if (!link.protocol) {
|
|
|
|
|
|
|
|
this.wappalyzer.log("Element is not a valid link interface.", "driver", "error");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (results == null || !results.hasOwnProperty("push")) {
|
|
|
|
|
|
|
|
this.wappalyzer.log("Result object is not an array.", "driver", "error");
|
|
|
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
}
|
|
|
|
if (link.protocol.match(/https?:/) && link.hostname === this.origPageUrl.hostname && extensions.test(link.pathname)) {
|
|
|
|
if (link.protocol.match(/https?:/) && link.hostname === this.origPageUrl.hostname && extensions.test(link.pathname)) {
|
|
|
|
link.hash = '';
|
|
|
|
link.hash = '';
|
|
|
|
|
|
|
|
|
|
|
|