Skip to content

Commit

Permalink
Rebuild and Merge remote-tracking branch 'wet-boew/master' into featu…
Browse files Browse the repository at this point in the history
…re-table-parser

Conflicts:
	build/js/pe-ap-min.js
  • Loading branch information
duboisp committed Sep 11, 2012
2 parents 2be609f + 1dbf17e commit 147e4c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/js/pe-ap-min.js

Large diffs are not rendered by default.

20 changes: 15 additions & 5 deletions src/js/pe-ap.js
Expand Up @@ -105,9 +105,9 @@

if (($this.attr('data-replace-hash') === undefined && (url.hash.length > 0 && window.location.hostname === url.host)) || ($this.attr('data-replace-hash') !== undefined && $this.attr('data-replace-hash') === true)) {
newurl = url.path + '?';
for (urlparam in urlparams) { // Rebuilt the query string
for (urlparam in urlparams) { // Rebuild the query string
if (urlparams.hasOwnProperty(urlparam) && urlparam !== 'hashtarget') {
newurl += urlparams[urlparam] + '&';
newurl += urlparam + '=' + urlparams[urlparam] + '&';
}
}
$this.attr('href', newurl + 'hashtarget=' + url.hash); // Append hashtarget to the query string
Expand Down Expand Up @@ -665,21 +665,31 @@
disablels = (lsenabled ? localStorage.getItem('pedisable') : null),
disable = (pe.urlquery.pedisable !== undefined ? pe.urlquery.pedisable : disablels),
tphp = document.getElementById('wb-tphp'),
li = document.createElement('li');
li = document.createElement('li'),
qparams = pe.urlquery,
qparam,
newquery = '?';

for (qparam in qparams) { // Rebuild the query string
if (qparams.hasOwnProperty(qparam) && qparam !== 'pedisable') {
newquery += qparam + '=' + qparams[qparam] + '&';
}
}

if ((pe.ie > 0 && pe.ie < 7 && disable !== "false") || disable === "true") {
$('html').addClass('no-js pe-disable');
if (lsenabled) {
localStorage.setItem('pedisable', 'true'); // Set PE to be disable in localStorage
}
li.innerHTML = '<a href="?pedisable=false">' + pe.dic.get('%pe-enable') + '</a>';
li.innerHTML = '<a href="' + newquery + 'pedisable=false">' + pe.dic.get('%pe-enable') + '</a>';
tphp.appendChild(li); // Add link to re-enable PE
return true;
} else if (disable === "false" || disablels !== null) {
if (lsenabled) {
localStorage.setItem('pedisable', 'false'); // Set PE to be enabled in localStorage
}
}
li.innerHTML = '<a href="?pedisable=true">' + pe.dic.get('%pe-disable') + '</a>';
li.innerHTML = '<a href="' + newquery + 'pedisable=true">' + pe.dic.get('%pe-disable') + '</a>';
tphp.appendChild(li); // Add link to disable PE
return false;
},
Expand Down

0 comments on commit 147e4c6

Please sign in to comment.