User:PB2008/script-installer.js: Difference between revisions

From Test Wiki
m
no edit summary
mNo edit summary
Tags: Mobile edit Mobile web edit
mNo edit summary
Tags: Mobile edit Mobile web edit
Line 372: Line 372:
                     $( "<label>" )
                     $( "<label>" )
                         .attr( "for", "siQuickFilter" )
                         .attr( "for", "siQuickFilter" )
                         .text( "Quick filter:" ),
                         .text( "簡易過濾器:" ),
                     $( "<input>" )
                     $( "<input>" )
                         .attr( { "id": "siQuickFilter", "type": "text" } )
                         .attr( { "id": "siQuickFilter", "type": "text" } )
Line 450: Line 450:
                                                 .click( function () {
                                                 .click( function () {
                                                     var dest = null;
                                                     var dest = null;
                                                     var PROMPT = "Destination? Enter one of: " + SKINS.join( ", " );
                                                     var PROMPT = "目的地?輸入其中一個:" + SKINS.join( ", " );
                                                     do {
                                                     do {
                                                         dest = ( window.prompt( PROMPT ) || "" ).toLowerCase();
                                                         dest = ( window.prompt( PROMPT ) || "" ).toLowerCase();
                                                     } while( dest && SKINS.indexOf( dest ) < 0 )
                                                     } while( dest && SKINS.indexOf( dest ) < 0 )
                                                     if( !dest ) return;
                                                     if( !dest ) return;
                                                     $( this ).text( "Moving" );
                                                     $( this ).text( "移動中" );
                                                     anImport.move( dest ).done( function () {
                                                     anImport.move( dest ).done( function () {
                                                         conditionalReload( true );
                                                         conditionalReload( true );
Line 486: Line 486:
                     var skinIndex = SKINS.indexOf( pageName.substring( prefixLength ).slice( 0, -3 ) );
                     var skinIndex = SKINS.indexOf( pageName.substring( prefixLength ).slice( 0, -3 ) );
                     if( skinIndex >= 0 ) {
                     if( skinIndex >= 0 ) {
                         return $( "<abbr>" ).text( "Cannot install" )
                         return $( "<abbr>" ).text( "不能安裝" )
                                 .attr( "title", "This page is one of your user customization pages, and " +
                                 .attr( "title", "此頁面是你的使用者自訂頁面之一,並且" +
                                         ( ( skinIndex === 0 ) ? "will" : "may" ) + " already run on each page load." );
                                         ( ( skinIndex === 0 ) ? "" : "可能" ) + "已經在每個頁面加載時運行。" );
                     }
                     }
                 }
                 }
                 addingInstallLink = true;
                 addingInstallLink = true;
             } else {
             } else {
                 return $( "<abbr>" ).text( "Cannot install (not JS)" )
                 return $( "<abbr>" ).text( "不能安裝 (不是 JS)" )
                         .attr( "title", "Page content model is " + contentModel + ", not 'javascript'" );
                         .attr( "title", "頁面內容模型是" + contentModel + ",不是'javascript'" );
             }
             }
         }
         }
Line 686: Line 686:
             if( document.cookie.indexOf( "open_script_installer=yes" ) >= 0 ) {
             if( document.cookie.indexOf( "open_script_installer=yes" ) >= 0 ) {
                 document.cookie = "open_script_installer=; expires=Thu, 01 Jan 1970 00:00:01 GMT";
                 document.cookie = "open_script_installer=; expires=Thu, 01 Jan 1970 00:00:01 GMT";
                 $( "#script-installer-top-container a:contains('Manage')" ).trigger( "click" );
                 $( "#script-installer-top-container a:contains('管理')" ).trigger( "click" );
             }
             }
         } );
         } );
     } );
     } );
} )();
} )();
Cookies help us deliver our services. By using our services, you agree to our use of cookies.