mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-11-25 16:00:22 +01:00
middle click on images opens them normally
This commit is contained in:
parent
5ef7d63f3a
commit
b23ec4a66f
7
main.js
Normal file → Executable file
7
main.js
Normal file → Executable file
@ -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;
|
||||
|
||||
|
5
templates/main.js
Normal file → Executable file
5
templates/main.js
Normal file → Executable file
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user