michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: "use strict"; michael@0: michael@0: const gcli = require("gcli/index"); michael@0: michael@0: exports.items = [ michael@0: { michael@0: name: "media", michael@0: description: gcli.lookup("mediaDesc") michael@0: }, michael@0: { michael@0: name: "media emulate", michael@0: description: gcli.lookup("mediaEmulateDesc"), michael@0: manual: gcli.lookup("mediaEmulateManual"), michael@0: params: [ michael@0: { michael@0: name: "type", michael@0: description: gcli.lookup("mediaEmulateType"), michael@0: type: { michael@0: name: "selection", michael@0: data: [ michael@0: "braille", "embossed", "handheld", "print", "projection", michael@0: "screen", "speech", "tty", "tv" michael@0: ] michael@0: } michael@0: } michael@0: ], michael@0: exec: function(args, context) { michael@0: let markupDocumentViewer = context.environment.chromeWindow michael@0: .gBrowser.markupDocumentViewer; michael@0: markupDocumentViewer.emulateMedium(args.type); michael@0: } michael@0: }, michael@0: { michael@0: name: "media reset", michael@0: description: gcli.lookup("mediaResetDesc"), michael@0: manual: gcli.lookup("mediaEmulateManual"), michael@0: exec: function(args, context) { michael@0: let markupDocumentViewer = context.environment.chromeWindow michael@0: .gBrowser.markupDocumentViewer; michael@0: markupDocumentViewer.stopEmulatingMedium(); michael@0: } michael@0: } michael@0: ];