Make permalink button work in IE8.
IE8 doesn't have addEventListener, so use attachEvent if that doesn't exist. Auditors: alpert
This commit is contained in:
parent
efaf8b57b9
commit
fa3df2db6f
|
@ -9,9 +9,15 @@ function init() {
|
||||||
input.attachEvent("onkeyup", reprocess);
|
input.attachEvent("onkeyup", reprocess);
|
||||||
}
|
}
|
||||||
|
|
||||||
permalink.addEventListener("click", function() {
|
if ("addEventListener" in permalink) {
|
||||||
window.location.search = "?text=" + encodeURIComponent(input.value);
|
permalink.addEventListener("click", function() {
|
||||||
});
|
window.location.search = "?text=" + encodeURIComponent(input.value);
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
permalink.attachEvent("click", function() {
|
||||||
|
window.location.search = "?text=" + encodeURIComponent(input.value);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var match = (/(?:^\?|&)text=([^&]+)/).exec(window.location.search);
|
var match = (/(?:^\?|&)text=([^&]+)/).exec(window.location.search);
|
||||||
if (match) {
|
if (match) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user