Fossil

Diff
Login

Differences From Artifact [b5d90cc95c]:

To Artifact [eb660e4bef]:


795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
  /**
     Update the page title and header based on the state of
     this.winfo. A no-op if this.winfo is not set. Returns this.
  */
  P.updatePageTitle = function f(){
    if(!f.titleElement){
      f.titleElement = document.head.querySelector('title');
      f.pageTitleHeader = document.querySelector('div.header .title');
    }
    var title = ['Wiki Editor:'];
    const wi = P.winfo;
    if(wi){
      if(!wi.version && 'sandbox'!==wi.type) title.push(P.config.editStateMarkers.isNew);
      else if($stash.getWinfo(wi)) title.push(P.config.editStateMarkers.isModified)
      title.push(wi.name);
    }else{
      title.push('(no page loaded)');
    }
    title = title.join(' ');
    f.titleElement.innerText = title;
    f.pageTitleHeader.innerText = title;
    return this;
  };

  /**
     Change the save button depending on whether we have stuff to save
     or not.
  */







|

|








|
|
<







795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814

815
816
817
818
819
820
821
  /**
     Update the page title and header based on the state of
     this.winfo. A no-op if this.winfo is not set. Returns this.
  */
  P.updatePageTitle = function f(){
    if(!f.titleElement){
      f.titleElement = document.head.querySelector('title');
      f.pageTitleHeader = document.querySelector('#wikiedit-page-name > span');
    }
    const title = ['Wiki Editor:'];
    const wi = P.winfo;
    if(wi){
      if(!wi.version && 'sandbox'!==wi.type) title.push(P.config.editStateMarkers.isNew);
      else if($stash.getWinfo(wi)) title.push(P.config.editStateMarkers.isModified)
      title.push(wi.name);
    }else{
      title.push('(no page loaded)');
    }
    f.pageTitleHeader.innerText = title[1];
    f.titleElement.innerText = title.join(' ');

    return this;
  };

  /**
     Change the save button depending on whether we have stuff to save
     or not.
  */