File tree 1 file changed +24
-0
lines changed
1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change 44
44
<script type =" application/x-javascript" >
45
45
window.gFindBar = document.getElementById("FindToolbar");
46
46
</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
+
47
71
</vbox >
48
72
</window >
You can’t perform that action at this time.
0 commit comments