File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 4444 <script type =" application/x-javascript" >
4545 window.gFindBar = document.getElementById("FindToolbar");
4646 </script >
47+
48+ <script type =" application/x-javascript" >
49+ <![CDATA[
50+ const MIN_WIDTH=700, MIN_HEIGHT=600;
51+ let resizeTaskID;
52+
53+ window.addEventListener("resize", (event) => {
54+ let { outerWidth, outerHeight } = window;
55+
56+ let newWidth = outerWidth >= MIN_WIDTH ? outerWidth : MIN_WIDTH;
57+ let newHeight = outerHeight >= MIN_HEIGHT ? outerHeight : MIN_HEIGHT;
58+
59+ if (outerWidth < MIN_WIDTH || outerHeight < MIN_HEIGHT) {
60+ event.preventDefault();
61+ if (resizeTaskID) {
62+ clearTimeout(resizeTaskID);
63+ }
64+ resizeTaskID = setTimeout(() => window.resizeTo(newWidth, newHeight), 200);
65+ return false;
66+ }
67+ }, false)
68+ ]]>
69+ </script >
70+
4771 </vbox >
4872</window >
You can’t perform that action at this time.
0 commit comments