\r
function yourWorkWillBeLost(e) {\r
if(browserTester('chrome')) {\r
- return "You sure you want to leave? Your work will be lost.";\r
+ return "Are you sure you want to leave? Your work will be lost.";\r
} else if(browserTester('safari')) {\r
- return "You sure you want to leave? Your work will be lost.";\r
+ return "Are you sure you want to leave? Your work will be lost.";\r
} else {\r
if(!e) e = window.event;\r
e.cancelBubble = true;\r
- e.returnValue = 'If you leave your work will be lost.';\r
+ e.returnValue = 'If you leave, your work will be lost.';\r
\r
if (e.stopPropagation) {\r
e.stopPropagation();\r
}\r
\r
function browserTester(browserString) {\r
- var test = navigator.userAgent;\r
return navigator.userAgent.toLowerCase().indexOf(browserString) > -1;\r
}
\ No newline at end of file
var keyCode = key.charCode || key.keyCode;
var keyCodeStr = String.fromCharCode(keyCode).toLowerCase();
+ // Bugfix for messed up DEL and .
+ if (keyCode === 46) {
+ keyCodeStr = "";
+ }
+ if (keyCode === 190) {
+ keyCodeStr = ".";
+ }
+
switch(keyCodeStr) {
case "b":
doClick(document.getElementById("wmd-bold-button"));
this.text = inputArea.value;
}
- }
+ };
// Sets the selected text in the input box after we've performed an
// operation.
Attacklab.wmd_env = {};
Attacklab.account_options = {};
-Attacklab.wmd_defaults = {version:1, output:"HTML", lineLength:40, delayLoad:false};
+Attacklab.wmd_defaults = {version:1, output:"Markdown", lineLength:40, delayLoad:false};
if(!Attacklab.wmd)
{