File tree 1 file changed +9
-5
lines changed 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change
1
+ // Why do I keep these here anymore??
1
2
window . gebid = document . getElementById . bind ( document ) ;
2
3
window . qsel = document . querySelector . bind ( document ) ;
3
4
window . qselall = document . querySelectorAll . bind ( document ) ;
@@ -10,7 +11,10 @@ function fillEntirePage() {
10
11
} ) ;
11
12
}
12
13
14
+ //---------------------------------------------------------------------------------------------------------------
15
+
13
16
( function ( ) {
17
+ if ( / a r m d r o i d / . test ( location . pathname ) ) return ; // The Armdroid site is its own sub thing so ignore it
14
18
// Dark mode hack
15
19
var dmmq = window . matchMedia ( '(prefers-color-scheme: dark)' ) ;
16
20
var icon = document . querySelector ( 'link[rel="icon"]' ) ;
@@ -37,13 +41,13 @@ function fillEntirePage() {
37
41
dmmq . addEventListener ( 'change' , updateThemedStuff ) ;
38
42
} ) ( ) ;
39
43
44
+ //--------------------------------------------------------------------------------------------------------
45
+
40
46
( function ( ) {
41
47
// Images click
42
48
for ( var image of document . querySelectorAll ( "img[src]" ) ) {
43
- var a = document . createElement ( "a" ) ;
44
- a . setAttribute ( "target" , "_blank" ) ;
45
- a . setAttribute ( "href" , image . getAttribute ( "src" ) ) ;
46
- image . parentNode . insertBefore ( a , image ) ;
47
- a . append ( image ) ;
49
+ image . addEventListener ( 'click' , function ( ) {
50
+ window . open ( this . getAttribute ( 'src' ) , '_blank' ) ;
51
+ } ) ;
48
52
}
49
53
} ) ( ) ;
You can’t perform that action at this time.
0 commit comments