View | Details | Raw Unified | Return to bug 35134
Collapse All | Expand All

(-)a/cataloguing/value_builder/cn_browser.pl (-2 / +12 lines)
Lines 38-44 function Click$function_name(ev) { Link Here
38
    let window_width = screen.width / 2;
38
    let window_width = screen.width / 2;
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
    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\");
41
42
    if(Cookies.get(\"popup_window_height\") && Cookies.get(\"popup_window_width\")){
43
        window_width = Cookies.get(\"popup_window_width\");
44
        window_height = Cookies.get(\"popup_window_height\");
45
    }
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\");
48
49
    windowref.onresize = function(){
50
        Cookies.set(\"popup_window_height\", windowref.innerHeight, { path: '/', sameSite: 'Lax' });
51
        Cookies.set(\"popup_window_width\", windowref.innerWidth, { path: '/', sameSite: 'Lax' });
52
    }
42
}
53
}
43
54
44
</script>
55
</script>
45
- 

Return to bug 35134