ckeditor_axe-1.0.x-dev/js/plugins/axe/axe/plugin.min.js

js/plugins/axe/axe/plugin.min.js
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};!function(l){l.plugins.add("axe",{lang:"en",onLoad:function(){var e={context:void 0,run:{}};e.run.rules={"aria-hidden-body":{enabled:!1},bypass:{enabled:!1},"document-title":{enabled:!1},"frame-tested":{enabled:!1},"frame-title-unique":{enabled:!1},"frame-title":{enabled:!1},"html-has-lang":{enabled:!1},"html-lang-valid":{enabled:!1},"html-xml-lang-mismatch":{enabled:!1},"landmark-banner-is-top-level":{enabled:!1},"landmark-complementary-is-top-level":{enabled:!1},"landmark-contentinfo-is-top-level":{enabled:!1},"landmark-main-is-top-level":{enabled:!1},"landmark-no-duplicate-banner":{enabled:!1},"landmark-no-duplicate-contentinfo":{enabled:!1},"landmark-one-main":{enabled:!1},"meta-viewport-large":{enabled:!1},"meta-viewport":{enabled:!1},"page-has-heading-one":{enabled:!1},region:{enabled:!1},"valid-lang":{enabled:!1}},e.callback=function(e,n,t){if(e)throw e;if(console.log(n),void 0===l.instances[t])return console.error("Can't find editor instance."),!1;var a,o,i=l.instances[t];return"object"===_typeof(n.violations)&&(a=[],o=[],n.violations.forEach(function(e,n){"object"===_typeof(e.nodes)&&(a[n]={title:e.help,description:e.description},e.nodes.forEach(function(e){"undefined"!==e.target[0]&&void 0===o[e.target[0]]&&(o[e.target[0]]=i.document.$.querySelector(e.target[0]),console.dir(o[e.target[0]]))}))}),console.log(a),console.log(o)),!0},e.path=void 0,e.override=function(n){var t;if(void 0!==n&&(void 0!==n.context&&(this.context=n.context),void 0!==n.run&&(t=this.run.rules,Object.keys(t).forEach(function(e){n.run[e]=t[e]}),this.run=n.run),"function"==typeof n.callback&&(this.callback=n.callback),"string"==typeof n.path&&(this.path=n.path)),"string"!=typeof this.path){var e=document.querySelectorAll("script[src$='/axe.js'],script[src$='/axe.min.js']");if(!e.length)return console.error("Can't fin axe.js or axe.min.js file. Please check if they were included."),!1;this.path=e[0].src}return void 0===this.callbackNumber&&(this.callbackNumber=l.tools.addFunction(this.callback)),!0},this.axe=e},init:function(e){var t=this,n=e.lang.axe;t.axe.override(e.config.axe),e.on("instanceReady",function(){var e=[t.axe.path,t.path+"frame.js"],n=this;e.forEach(function(e){n.document.getHead().append(n.document.createElement("script",{attributes:{src:e,type:"text/javascript",defer:!0}}))})}),e.ui.addButton("axe",{label:n.name,command:"axe",icon:t.path+"icons/axe.png",toolbar:"others"}),e.addCommand("axe",{canUndo:!1,exec:function(e){var n={command:"run",editor:e.name,arguments:{context:t.axe.context,options:t.axe.run,callback:t.axe.callbackNumber}};e.document.getWindow().$.postMessage(n)}})}})}(CKEDITOR);

Главная | Обратная связь

drupal hosting | друпал хостинг | it patrol .inc