diff --git a/manifest.json b/manifest.json index bd79b89..c05b91b 100755 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name": "NumTabs", - "version": "0.2", + "version": "0.4", "description": "Adds position numbers to the titles of tabs.", "background_page": "numtab.html", "icons": { diff --git a/numtab.js b/numtab.js index 660e602..44f9934 100755 --- a/numtab.js +++ b/numtab.js @@ -7,8 +7,8 @@ var title = document.title; if(id !== old_id){ var len = 0; - if(old_id){ - len = old_id.toString().length + if(old_id && /\d\s/g.test(title)){ + len = 2; } title = id + " " + title.substr(len); //console.log(title); @@ -17,4 +17,4 @@ } }, 100); } -})() \ No newline at end of file +})(); \ No newline at end of file diff --git a/numtabs.zip b/numtabs.zip index d0f62c6..0e547e3 100755 Binary files a/numtabs.zip and b/numtabs.zip differ