Open GitHub link in a new tab

This commit is contained in:
Liyas Thomas
2019-08-23 11:17:24 +05:30
parent 8164e9712b
commit 452c4ac89e
2 changed files with 1 additions and 5 deletions

View File

@@ -259,7 +259,7 @@
</div> </div>
</fieldset> </fieldset>
<footer> <footer>
<a href="https://github.com/liyasthomas/postwoman"><img src="icons/github.svg" alt="" style="margin-right: 16px">GitHub</a> <a href="https://github.com/liyasthomas/postwoman" target="_blank"><img src="icons/github.svg" alt="" style="margin-right: 16px">GitHub</a>
<button id="installPWA" onclick="installPWA()"> <button id="installPWA" onclick="installPWA()">
Install PWA Install PWA
</button> </button>

View File

@@ -29,11 +29,9 @@ const app = new Vue({
history: window.localStorage.getItem('history') ? JSON.parse(window.localStorage.getItem('history')) : [] history: window.localStorage.getItem('history') ? JSON.parse(window.localStorage.getItem('history')) : []
}, },
computed: { computed: {
noHistoryToClear() { noHistoryToClear() {
return this.history.length === 0; return this.history.length === 0;
}, },
urlNotValid() { urlNotValid() {
const pattern = new RegExp('^(https?:\\/\\/)?' + const pattern = new RegExp('^(https?:\\/\\/)?' +
'((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' + '((([a-z\\d]([a-z\\d-]*[a-z\\d])*)\\.)+[a-z]{2,}|' +
@@ -84,12 +82,10 @@ const app = new Vue({
this.history.splice(this.history.indexOf(entry), 1) this.history.splice(this.history.indexOf(entry), 1)
window.localStorage.setItem('history', JSON.stringify(this.history)) window.localStorage.setItem('history', JSON.stringify(this.history))
}, },
clearHistory() { clearHistory() {
this.history = [] this.history = []
window.localStorage.setItem('history', JSON.stringify(this.history)) window.localStorage.setItem('history', JSON.stringify(this.history))
}, },
useHistory({ useHistory({
method, method,
url, url,