PDA

View Full Version : "Dispay"


SEPKA
24th-October-2009, 02:42 PM
It is either my problem (which seems not to be since I have tried different computer, browser and OS), or the forum problem, or the network at my place's problem.

Anyway, the Spoiler button is currently "Dispay" which is wrong spellings.

Claverhouse
24th-October-2009, 04:02 PM
You must have missed previous explanations of this phenomenon.

http://www.intpforum.com/showthread.php?p=111954


Feel free to either bring this to the attention of the maker of the spoiler modification, le maitre Cédric Claerhout

http://www.vbulletin.org/forum/showthread.php?t=220257

or to modify his code yourself with his permission.



Claverhouse :phear:

Cameron
17th-December-2009, 01:51 PM
This was kind of bothering me too, as incredibly trivial as it is.

It looks like someone already reported the bug to the developer several months ago, to no avail, so I decided to write a GreaseMonkey (https://addons.mozilla.org/en-US/firefox/addon/748) script to hack around the problem.

I guess you're not using Firefox, but maybe you'll switch someday or this will be of use to someone else:


// ==UserScript==
// @name Hied
// @namespace http://intpforum.com/
// @description Hied dispay
// @include http://*intpforum.com/*
// ==/UserScript==

// GreaseMonkey won't let us modify the existing onClick
// handler, so we'll just fight it. That's right, violence is the solution!
function battlingClickHandler() {
if (this.value == 'Dispay')
this.value = 'Display';
}

// Find the relevant spoiler buttons
spoilerButtons = document.evaluate(
"//input[@value='Dispay' and @type='button']",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);

// Go through and fix each one
for (var i = 0; i < spoilerButtons.snapshotLength; i++) {
var node = spoilerButtons.snapshotItem(i);

// Adjust the initial label
node.value = "Display";

// Make sure it stays that way even after being clicked
node.addEventListener("click", battlingClickHandler, true);
}
Oh, and yes, I am totally avoiding doing more important things. :rolleyes:

Hope this helps.