diff options
| author | Savetheinternet <savetheinternet@tinyboard.org> | 2011-06-23 22:54:27 +1000 |
|---|---|---|
| committer | Savetheinternet <savetheinternet@tinyboard.org> | 2011-06-23 22:54:27 +1000 |
| commit | 833af50181aa9c8574899b20a216400e7b9d12d1 (patch) | |
| tree | daf7787e1a483aa9c33b9f1cbcd554e7cbb1cd85 | |
| parent | 6ca99d189dd64ec83385dc6361f5b62f768162bf (diff) | |
middle click on images opens them normally
| -rwxr-xr-x[-rw-r--r--] | main.js | 7 | ||||
| -rwxr-xr-x[-rw-r--r--] | templates/main.js | 5 |
2 files changed, 9 insertions, 3 deletions
@@ -136,7 +136,10 @@ function init() link = document.getElementsByTagName('a');
for ( i in link ) {
if(typeof link[i] == "object" && link[i].childNodes[0].src) {
- link[i].onclick = function() {
+ link[i].onclick = function(e) {
+ if(e.which == 2) {
+ return true;
+ }
if(!this.tag) {
this.tag = this.childNodes[0].src;
this.childNodes[0].src = this.href;
@@ -165,5 +168,5 @@ var RecaptchaOptions = { theme : 'clean'
};
-
window.onload = init;
+
diff --git a/templates/main.js b/templates/main.js index cf9f9e77..6d0eeabc 100644..100755 --- a/templates/main.js +++ b/templates/main.js @@ -136,7 +136,10 @@ function init() link = document.getElementsByTagName('a');
for ( i in link ) {
if(typeof link[i] == "object" && link[i].childNodes[0].src) {
- link[i].onclick = function() {
+ link[i].onclick = function(e) {
+ if(e.which == 2) {
+ return true;
+ }
if(!this.tag) {
this.tag = this.childNodes[0].src;
this.childNodes[0].src = this.href;
|
