diff --git a/src/method/init.js b/src/method/init.js index 3c3d9cc..1a668a4 100644 --- a/src/method/init.js +++ b/src/method/init.js @@ -3,7 +3,6 @@ import _dir from './_dir' import { loadScript } from './loadScript' import { initQueryData } from './initQueryData' import { loadStyles } from './loadStyles' -import { updateNotice } from './updateNotice' import { syncI18nData } from './syncI18nData' import version from '../module/version' @@ -27,6 +26,7 @@ import { quickPreview } from '../module/quickPreview' import { quickRedirect } from '../module/quickRedirect' import { quickRename } from '../module/quickRename' import { specialNotice } from '../module/specialNotice' +import { updateNotice } from '../module/updateNotice' import { versionInfo } from '../module/versionInfo' /** diff --git a/src/module/_analytics.js b/src/module/_analytics.js index 6479ff6..2146829 100644 --- a/src/module/_analytics.js +++ b/src/module/_analytics.js @@ -1,6 +1,6 @@ import { analyticsApi } from './endpoints' import { preference } from './preference' -import { mwConfig } from './mw' +import { mwConfig } from '../utils/mw' import version from './version' /** diff --git a/src/module/_resolveExists.js b/src/module/_resolveExists.js index fda7939..0feb7bf 100644 --- a/src/module/_resolveExists.js +++ b/src/module/_resolveExists.js @@ -1,5 +1,5 @@ import { _msg } from './_msg' -import { _hasRight } from './_hasRight' +import { hasRight } from '../utils/hasRight' import { quickDelete } from './quickDelete' import { quickEdit } from './quickEdit' @@ -11,7 +11,7 @@ import { quickEdit } from './quickEdit' * @param {String} reason.edit 编辑原因 */ export const _resolveExists = function (page, reason = {}) { - const canDelete = _hasRight('delete') + const canDelete = hasRight('delete') if (typeof reason === 'string') { reason = { diff --git a/src/module/linksHere.js b/src/module/linksHere.js index 4534f92..183b95c 100644 --- a/src/module/linksHere.js +++ b/src/module/linksHere.js @@ -6,7 +6,7 @@ import { _analytics } from './_analytics' import { $progress, $link } from './_elements' import { _msg } from './_msg' -import { mwApi, mwConfig } from './mw' +import { mwApi, mwConfig } from '../utils/mw' import { quickEdit } from './quickEdit' /** diff --git a/src/module/loadQuickDiff.js b/src/module/loadQuickDiff.js index 1f515d2..82311a0 100644 --- a/src/module/loadQuickDiff.js +++ b/src/module/loadQuickDiff.js @@ -2,7 +2,8 @@ import { _msg } from './_msg' import { _analytics } from './_analytics' import { quickDiff } from './quickDiff' import { quickEdit } from './quickEdit' -import { mwConfig } from './mw' +import { mwConfig } from '../utils/mw' +import { isPureLMBClick } from '../utils/mouseEvent' const { getParamValue } = mw.util function injectLinks(container) { @@ -87,6 +88,7 @@ function injectLinks(container) { // 点击事件 $this.on('click', function (e) { + if (!isPureLMBClick(e)) return e.preventDefault() _analytics('quick_diff_recentchanges') return quickDiff(params) @@ -108,9 +110,7 @@ export function loadQuickDiff(container) { $('