@@ -47,6 +47,9 @@ let params;
47
47
function windows ( link , icn , title , browser = Boolean , os = Boolean , fullscreen = Boolean , appName , textAppText ) {
48
48
document . querySelector ( ".shell" ) . appendChild ( appShell ) ;
49
49
appShell . appendChild ( appsShellName ) ;
50
+ if ( appsShellName . classList . contains ( "noHoverApps" ) ) {
51
+ appsShellName . classList . remove ( "noHoverApps" )
52
+ }
50
53
appsShellName . innerText = title ;
51
54
const appID = document . querySelector ( ".name" ) . getAttribute ( "data-id" ) ;
52
55
let chromeJS = document . createElement ( "script" ) ;
@@ -72,7 +75,11 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
72
75
newwin . setAttribute ( "data-appName" , appName ) ;
73
76
74
77
appsShellName . onclick = ( e ) => {
75
- appOptions . classList . toggle ( "h" ) ;
78
+ if ( appsShellName . innerHTML == "" ) {
79
+ return
80
+ } else {
81
+ appOptions . classList . toggle ( "h" ) ;
82
+ }
76
83
appOptions . querySelector ( ".closeApp" ) . onclick = ( e ) => {
77
84
appsShellName . innerHTML = "" ;
78
85
appOptions . classList . toggle ( "h" ) ;
@@ -910,6 +917,9 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
910
917
appsShellName . innerText = "" ;
911
918
appsShellName . setAttribute ( "data-id" , "" ) ;
912
919
newdock . remove ( ) ;
920
+ if ( document . querySelectorAll ( ".win" ) . length === 0 ) {
921
+ appsShellName . classList . add ( "noHoverApps" ) ;
922
+ }
913
923
} ) ;
914
924
newwin . querySelector ( '.maxi' ) . onclick = ( ) => {
915
925
var winFocus = document . querySelectorAll ( ".winFocus" ) ;
@@ -1090,21 +1100,23 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
1090
1100
let winID ;
1091
1101
if ( ! e . target . classList . contains ( ".winconts" ) && e . target != document . body ) {
1092
1102
winID = e . target . parentElement . parentElement . id ;
1093
- } else {
1094
- winID = e . target . parenElement . id ;
1103
+ } if ( e . target . classList . contains ( "winconts" ) ) {
1104
+ winID = e . target . parentElement . id ;
1095
1105
}
1106
+ winEl = document . getElementById ( winID ) ;
1096
1107
if ( e . target . closest ( ".winconts" ) && ! e . target . closest ( ".controls" ) && ! e . target . closest ( ".searchbar" ) && ! e . target . closest ( ".m" ) && ! e . target . closest ( ".icon" ) ) {
1097
1108
if ( document . getElementById ( "ctx" ) ) {
1098
1109
document . getElementById ( "ctx" ) . remove ( ) ;
1099
1110
}
1100
1111
ctxm . style . top = e . pageY + "px" ;
1101
1112
ctxm . style . left = e . pageX + "px" ;
1102
1113
menu . innerHTML = `
1114
+ <a class="ctxbt" id="ctxNewWindow">New Window</a>
1103
1115
<a class="ctxbt" id="ctxCloseWin">Close</a>
1104
1116
<a class="ctxbt" id="ctxMaxWin">Maximize</a>
1105
1117
<a class="ctxbt" id="ctxMinWin">Minimize</a>
1106
1118
<a class="ctxbt" id="ctxReload">Reload</a>
1107
- ` ;
1119
+ ` ;
1108
1120
window . addEventListener ( "mousedown" , ( e ) => {
1109
1121
if ( e . button == 0 && ! e . target . closest ( ".ctx" ) ) {
1110
1122
ctxm . remove ( ) ;
@@ -1128,10 +1140,15 @@ function windows(link, icn, title, browser = Boolean, os = Boolean, fullscreen =
1128
1140
} ) ;
1129
1141
const ctxReload = document . querySelector ( "#ctxReload" ) ;
1130
1142
ctxReload . addEventListener ( "click" , ( ) => {
1131
- const frame = newwin . querySelector ( "iframe" ) ;
1143
+ const frame = winEl . querySelector ( "iframe" ) ;
1132
1144
frame . src = frame . src ;
1133
1145
ctxm . remove ( ) ;
1134
1146
} ) ;
1147
+ const ctxNewWindow = document . querySelector ( "#ctxNewWindow" ) ;
1148
+ ctxNewWindow . addEventListener ( "click" , ( ) => {
1149
+ window . windows ( link , icn , title , browser , os , fullscreen , appName , textAppText ) ;
1150
+ ctxm . remove ( ) ;
1151
+ } ) ;
1135
1152
}
1136
1153
// if(e.target.closest(".appItem")) {
1137
1154
// if(document.getElementById("ctx")) {
0 commit comments