Skip to content

Commit

Permalink
Use site base attribute if it exists
Browse files Browse the repository at this point in the history
  • Loading branch information
remdex committed Dec 25, 2014
1 parent a7a4f11 commit ae9578a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lhc_web/design/defaulttheme/js/cobrowse/lhc_operator.js
Expand Up @@ -87,6 +87,7 @@ var LHCCoBrowserOperator = (function() {
var node = document.createElement('HEAD');
node.appendChild(document.createElement('BASE'));
node.firstChild.href = _this.base;
node.firstChild.id = "lhc-co-browse-base-id";
return node;
}
},
Expand All @@ -101,6 +102,11 @@ var LHCCoBrowserOperator = (function() {
return true;
}

// There exists original base so remove our own detected.
if (node.nodeName == 'BASE') {
$(_this.iFrameDocument).find('#lhc-co-browse-base-id').remove();
}

// remove anchors's onclick dom0-style handlers so they
// don't mess with our click handler and don't produce errors
if (node.nodeName == 'A' && attr == 'onclick') {
Expand Down

0 comments on commit ae9578a

Please sign in to comment.