Revert "Load js-url lib using legacy-loader"
Didn't work in Firefox for some reason.
`[Script Loader] ReferenceError: module is not defined`
This reverts commit 5b83deb043.
This commit is contained in:
@@ -12,16 +12,14 @@ import {
|
||||
urlpath
|
||||
} from './lib/config'
|
||||
|
||||
var jsUrl = require('js-url')
|
||||
|
||||
window.migrateHistoryFromTempCallback = null
|
||||
|
||||
migrateHistoryFromTemp()
|
||||
|
||||
function migrateHistoryFromTemp () {
|
||||
if (jsUrl('#tempid')) {
|
||||
if (window.url('#tempid')) {
|
||||
$.get(`${serverurl}/temp`, {
|
||||
tempid: jsUrl('#tempid')
|
||||
tempid: window.url('#tempid')
|
||||
})
|
||||
.done(data => {
|
||||
if (data && data.temp) {
|
||||
|
||||
@@ -21,8 +21,6 @@ import _ from 'lodash'
|
||||
|
||||
import List from 'list.js'
|
||||
|
||||
var jsUrl = require('js-url')
|
||||
|
||||
import {
|
||||
checkLoginStateChanged,
|
||||
setloginStateChangeEvent
|
||||
@@ -1476,12 +1474,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 = jsUrl('hostname', gisturl)
|
||||
var hostname = window.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/' + jsUrl('-1', gisturl))
|
||||
$.get('https://api.github.com/gists/' + window.url('-1', gisturl))
|
||||
.done(function (data) {
|
||||
if (data.files) {
|
||||
var contents = ''
|
||||
|
||||
Reference in New Issue
Block a user