Lines 39-54
function Click$function_name(ev) {
Link Here
|
39 |
let window_height = screen.height; |
39 |
let window_height = screen.height; |
40 |
q = document.getElementById(ev.data.id); |
40 |
q = document.getElementById(ev.data.id); |
41 |
|
41 |
|
42 |
if(Cookies.get(\"popup_window_height\") && Cookies.get(\"popup_window_width\")){ |
42 |
if(localStorage.getItem(\"popup_window_height\") && localStorage.getItem(\"popup_window_width\")){ |
43 |
window_width = Cookies.get(\"popup_window_width\"); |
43 |
window_width = localStorage.getItem(\"popup_window_width\"); |
44 |
window_height = Cookies.get(\"popup_window_height\"); |
44 |
window_height = localStorage.getItem(\"popup_window_height\"); |
45 |
} |
45 |
} |
46 |
|
46 |
|
47 |
var windowref = window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q=\"+encodeURIComponent(q.value),\"cnbrowser\",\"width=\"+window_width+\"\,height=\"+window_height+\"\,toolbar=false,scrollbars=yes\"); |
47 |
var windowref = window.open(\"../cataloguing/plugin_launcher.pl?plugin_name=cn_browser.pl&popup&q=\"+encodeURIComponent(q.value),\"cnbrowser\",\"width=\"+window_width+\"\,height=\"+window_height+\"\,toolbar=false,scrollbars=yes\"); |
48 |
|
48 |
|
49 |
windowref.onresize = function(){ |
49 |
windowref.onresize = function(){ |
50 |
Cookies.set(\"popup_window_height\", windowref.innerHeight, { path: '/', sameSite: 'Lax' }); |
50 |
localStorage.setItem(\"popup_window_height\", windowref.innerHeight); |
51 |
Cookies.set(\"popup_window_width\", windowref.innerWidth, { path: '/', sameSite: 'Lax' }); |
51 |
localStorage.setItem(\"popup_window_width\", windowref.innerWidth); |
52 |
} |
52 |
} |
53 |
} |
53 |
} |
54 |
|
54 |
|