Only show popup if CodeMirror button exists

Bug: T170609
Change-Id: Ibe9aa1b7ffce2e7813aa9aa2ab45f349d8ad2082
This commit is contained in:
Kaldari 2017-08-03 15:55:16 -07:00
parent 9fe5908b7a
commit 28a9dd7fac

View file

@ -403,6 +403,11 @@
function handlePopup() {
var yesButton, noButton, $title, $content, popup;
// If CodeMirror button doesn't exist, don't show popup
if ( !$( '#mw-editbutton-codemirror' ).length ) {
return;
}
// If popup has previously been dismissed, don't show again.
if ( mw.storage.get( 'codemirror-try-popup' ) ) {
return;