Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

20
LINES

< > BotCompany Repo | #1028681 // hjs_setTitleStatus

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (2610L/17K).

1  
sS hjs_setTitleStatus() {
2  
  ret hjs([[
3  
    var originalWindowTitle;
4  
    var lastTitleStatus = "";
5  
    
6  
    window.setTitleStatus = function(status) {
7  
      if (originalWindowTitle == null)
8  
        originalWindowTitle = document.title;
9  
      if (status) status = status + " ";
10  
      if (status != lastTitleStatus) {
11  
        lastTitleStatus = status;
12  
        document.title = status + originalWindowTitle;
13  
      }
14  
    };
15  
    
16  
    window.resetTitle = function() {
17  
      window.setTitleStatus("");
18  
    };
19  
  ]]);
20  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1028681
Snippet name: hjs_setTitleStatus
Eternal ID of this version: #1028681/4
Text MD5: 7c9de5d9f17fb090820df9d02c325a90
Transpilation MD5: 0e8a57cce31b3d4234387f7eb983bb97
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-07-05 14:09:38
Source code size: 528 bytes / 20 lines
Pitched / IR pitched: No / No
Views / Downloads: 179 / 270
Version history: 3 change(s)
Referenced in: [show references]