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).

sS hjs_setTitleStatus() {
  ret hjs([[
    var originalWindowTitle;
    var lastTitleStatus = "";
    
    window.setTitleStatus = function(status) {
      if (originalWindowTitle == null)
        originalWindowTitle = document.title;
      if (status) status = status + " ";
      if (status != lastTitleStatus) {
        lastTitleStatus = status;
        document.title = status + originalWindowTitle;
      }
    };
    
    window.resetTitle = function() {
      window.setTitleStatus("");
    };
  ]]);
}

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: 244 / 360
Version history: 3 change(s)
Referenced in: [show references]