summaryrefslogtreecommitdiff
path: root/lib/scripts
diff options
context:
space:
mode:
authorMichael Klier <chi@chimeric.de>2008-10-11 16:39:46 +0200
committerMichael Klier <chi@chimeric.de>2008-10-11 16:39:46 +0200
commit3b1290f50d2e20f34040bdde3bbe241704a33793 (patch)
tree8f913e79ce3c001eae130e2b96a3b1f07fbd7f26 /lib/scripts
parent1c882ba8aab7be62fd4e47cccf74acab65a7ff4d (diff)
downloadrpg-3b1290f50d2e20f34040bdde3bbe241704a33793.tar.gz
rpg-3b1290f50d2e20f34040bdde3bbe241704a33793.tar.bz2
FS#1134 remove inline javascript from windows shares
darcs-hash:20081011143946-23886-78628e3ca7ec0c40f5d288c6a9832cd52b8b083b.gz
Diffstat (limited to 'lib/scripts')
-rw-r--r--lib/scripts/script.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/scripts/script.js b/lib/scripts/script.js
index 29d3e5db0..8c9327b1f 100644
--- a/lib/scripts/script.js
+++ b/lib/scripts/script.js
@@ -533,3 +533,30 @@ addInitEvent(function(){
$('action__selectorbtn').style.display = 'none';
});
+/**
+ * Display error for Windows Shares on browsers other than IE
+ *
+ * Michael Klier <chi@chimeric.de>
+ */
+function checkWindowsShares() {
+ var elems = getElementsByClass('windows',document,'a');
+ if(elems){
+ for(var i=0; i<elems.length; i++){
+ var share = elems[i];
+ addEvent(share,'click',function(){
+ if(document.all == null) {
+ alert(LANG['nosmblinks']);
+ }
+ });
+ }
+ }
+}
+
+/**
+ * Add the event handler for the Windows Shares check
+ *
+ * Michael Klier <chi@chimeric.de>
+ */
+addInitEvent(function(){
+ checkWindowsShares();
+});