@@ -7,7 +7,7 @@ chrome.extension.sendMessage({}, function(response) {
77 if ( $ ( '#loginForm' ) . length == 0 && $ ( '#bottomBar #startMenu' ) . length ) {
88 // ALL
99 var img = "" ;
10- chrome . storage . sync . get ( [ 'optBgLc' , 'optOSMode' ] , function ( result ) {
10+ chrome . storage . sync . get ( [ 'optBgLc' , 'optOSMode' , 'optOSPagesMode' ] , function ( result ) {
1111 img = result . optBgLc ;
1212
1313 var style = `
@@ -145,6 +145,83 @@ chrome.extension.sendMessage({}, function(response) {
145145 } , 975 ) ;
146146 }
147147
148+ // add pages os mode
149+ if ( result . optOSPagesMode == true ) {
150+
151+ $ ( document ) . on ( 'click.tlg' , '[onclick*="openPages"]' , function ( event ) {
152+ if ( ! $ ( '.pagesGroupContainer .positionLabel.init' ) . length ) {
153+ setTimeout ( function ( ) {
154+ $ ( '.pagesGroupContainer' ) . parents ( '.window' ) . find ( '.maximizeButton' ) . click ( ) ;
155+
156+ $ ( '.pagesGroupContainer .positionLabel' ) . addClass ( 'init' ) . each ( function ( ) {
157+ var txt = $ ( this ) . text ( ) ;
158+ var pos = txt . match ( / .{ 1 , } \s / g) ;
159+ var txtNoN = txt . replace ( new RegExp ( '.{1,}\\s' , 'g' ) , '' )
160+
161+ $ ( this ) . html ( pos + '<span class="n">' + txtNoN + '</span>' )
162+ } ) ;
163+
164+ var style = `
165+ <style>
166+ div.pagesWindowTree div.pagesTreeContainer{
167+ display: flex;
168+ flex-wrap: wrap;
169+ }
170+ div.pagesWindowTree div.pagesTreeContainer div.pagesGroupContainer {
171+ overflow: hidden;
172+ margin-bottom: 15px;
173+ border: 1px solid #b2b2b2;
174+ width: 20%;
175+ float: left;
176+ box-sizing: border-box;
177+ margin-left: -1px;
178+ height: 400px;
179+ padding-top: 37px;
180+ position: relative;
181+ }
182+ div.pagesWindowTree div.pagesTreeContainer div.pagesGroup > div.positionLabel {
183+ position: absolute;
184+ top: 0;
185+ right: 0;
186+ bottom: 0;
187+ left: 75%;
188+ overflow: hidden;
189+ padding-right: 15px;
190+ text-align: right;
191+ white-space: nowrap;
192+ }
193+ div.pagesWindowTree div.pagesTreeContainer div.pagesGroup > div.positionLabel .n{
194+ color: #FFF;
195+ font-weight: bold;
196+ font-size: 13px;
197+ padding: 3px 8px;
198+ background-color: #0099da;
199+ margin-left: 5px;
200+ border-radius: 4px;
201+ }
202+ div.pagesWindowTree div.pagesTreeContainer div.pagesGroup{
203+ position: absolute;
204+ top: 0;
205+ left: 0;
206+ right: 0;
207+ }
208+ div.pagesWindowTree div.pagesTreeContainer div.pagesGroupTree {
209+ height: calc(100% - 57px);
210+ position: absolute;
211+ overflow: auto;
212+ left: 0;
213+ right: 0;
214+ }
215+ </style>
216+ ` ;
217+ $ ( 'body' ) . append ( style ) ;
218+
219+ } , 975 ) ;
220+ }
221+ } ) ;
222+
223+ }
224+
148225 } ) ;
149226 }
150227 // LC inject ----------------------------------------------------------------
0 commit comments