Skip to content

Commit

Permalink
fixes #16; supporting [simplified-hostname] keyword
Browse files Browse the repository at this point in the history
  • Loading branch information
brian-girko committed Jan 24, 2021
1 parent f49fafa commit a1551c3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions chrome/background.js
Expand Up @@ -38,6 +38,7 @@ chrome.browserAction.onClicked.addListener(tab => chrome.storage.local.get({
let filename = (prefs.filename || '[title]')
.replace('[title]', tab.title)
.replace('[hostname]', n.hostname)
.replace('[simplified-hostname]', n.hostname.replace('www.', ''))
.replace('[date]', current.toDateString())
.replace('[current-date]', current.toLocaleDateString())
.replace('[time]', current.toTimeString())
Expand Down
2 changes: 1 addition & 1 deletion chrome/data/options/index.html
Expand Up @@ -28,7 +28,7 @@
<label for="filename">Filename Format</label>
<input type="textbox" id="filename">
</div>
<p class="note">Available options: <code>[title]</code>, <code>[hostname]</code>, <code>[date]</code>, <code>[current-date]</code>, <code>[time]</code>, <code>[current-time]</code>, <code>[YYYY]</code>, <code>[MM]</code>, <code>[DD]</code></p>
<p class="note">Available options: <code>[title]</code>, <code>[hostname]</code>, <code>[simplified-hostname]</code>, <code>[date]</code>, <code>[current-date]</code>, <code>[time]</code>, <code>[current-time]</code>, <code>[YYYY]</code>, <code>[MM]</code>, <code>[DD]</code></p>
<div class="grid">
<label for="extension">File Extension</label>
<input type="textbox" id="extension">
Expand Down

0 comments on commit a1551c3

Please sign in to comment.