MediaWiki:Common.js: Difference between revisions

Jump to navigation Jump to search
no edit summary
No edit summary
Tag: Manual revert
No edit summary
Line 1,282: Line 1,282:
     $chooser = $(
     $chooser = $(
       '<div id="print-chooser" class="print-chooser" style="display:none;">' +
       '<div id="print-chooser" class="print-chooser" style="display:none;">' +
         '<a href="#" id="print-with-border" class="print-choice">[with border]</a> ' +
         '<a href="#" id="print-with-border" class="print-choice">with border</a> ' +
         '<a href="#" id="print-no-border" class="print-choice">[no border]</a>' +
         '<a href="#" id="print-no-border" class="print-choice">no border</a>' +
         "</div>"
         "</div>"
     );
     );
Line 1,308: Line 1,308:
         var $chooser = ensurePrintChooser();
         var $chooser = ensurePrintChooser();
         $chooser.toggle();
         $chooser.toggle();
        // 👇 add these lines
        var $article = $("#show-article");
        if ($chooser.is(":visible")) {
          $article.addClass("print-opts-open");
        } else {
          $article.removeClass("print-opts-open");
        }
         return; // <-- don't start printing yet
         return; // <-- don't start printing yet
       }
       }

Navigation menu