diff options
author | Christoph (Sheogorath) Kern | 2019-04-19 21:46:08 +0200 |
---|---|---|
committer | GitHub | 2019-04-19 21:46:08 +0200 |
commit | 81904b671736165a5530d15d8f565006b401ca62 (patch) | |
tree | afa4597babc6226a732ca83bb5e0fcfc28fcaf6b /public/js/index.js | |
parent | a22c1a9d657cb41068aa5023e63f6251ac16a5c5 (diff) | |
parent | c0e75b8606267d50617807e251953ecc87b0a4e6 (diff) |
Merge pull request #51 from SISheogorath/fix/wurl
Replace js-url with wurl
Diffstat (limited to '')
-rw-r--r-- | public/js/index.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/public/js/index.js b/public/js/index.js index c59c94d0..d5345a8c 100644 --- a/public/js/index.js +++ b/public/js/index.js @@ -17,6 +17,7 @@ import { saveAs } from 'file-saver' import randomColor from 'randomcolor' import store from 'store' import hljs from 'highlight.js' +import url from 'wurl' import _ from 'lodash' @@ -1373,12 +1374,12 @@ $('#gistImportModalConfirm').click(function () { if (!isValidURL(gisturl)) { showMessageModal('<i class="fa fa-github"></i> Import from Gist', 'Not a valid URL :(', '', '', false) } else { - var hostname = window.url('hostname', gisturl) + var hostname = url('hostname', gisturl) if (hostname !== 'gist.github.com') { showMessageModal('<i class="fa fa-github"></i> Import from Gist', 'Not a valid Gist URL :(', '', '', false) } else { ui.spinner.show() - $.get('https://api.github.com/gists/' + window.url('-1', gisturl)) + $.get('https://api.github.com/gists/' + url('-1', gisturl)) .done(function (data) { if (data.files) { var contents = '' |