From ad5d9b45e5cafdada570171888d2ac6f4e3287cd Mon Sep 17 00:00:00 2001 From: nobody Date: Fri, 10 Jul 2020 20:46:03 +0200 Subject: [PATCH] Added Jets.js v0.14.1 (#56) --- core/mappings.js | 1 + core/resources.js | 5 +++++ modules/internal/helpers.js | 3 +++ pages/updates/updates.html | 1 + resources/jets/0.14.1/jets.min.jsm | 13 +++++++++++++ 5 files changed, 23 insertions(+) create mode 100644 resources/jets/0.14.1/jets.min.jsm diff --git a/core/mappings.js b/core/mappings.js index 96f1b094..defbed99 100644 --- a/core/mappings.js +++ b/core/mappings.js @@ -233,6 +233,7 @@ var mappings = { 'font-awesome/{version}/js/': resources.fontawesome5JS, 'jeditable.js/{version}/jquery.jeditable.min.js': resources.jeditableJS, 'jeditable.js/{version}/jeditable.min.js': resources.jeditableJS, + 'jets/{version}/jets.': resources.jetsJS, 'jquery/{version}/jquery.': resources.jQuery, 'jquery/{version}/jquery.min.': resources.jQuery, 'jquery.devbridge-autocomplete/{version}/jquery.autocomplete.min.js': resources.jQueryAjaxAutoComplete, diff --git a/core/resources.js b/core/resources.js index 8b988698..b2e6f96b 100644 --- a/core/resources.js +++ b/core/resources.js @@ -314,6 +314,11 @@ var resources = { 'path': 'resources/jquery-jeditable/{version}/jquery.jeditable.min.jsm', 'type': 'application/javascript' }, + // Jets.js + 'jetsJS': { + 'path': 'resources/jets/{version}/jets.min.jsm', + 'type': 'application/javascript' + }, // jQuery Ajax AutoComplete 'jQueryAjaxAutoComplete': { 'path': 'resources/jquery.devbridge-autocomplete/1.4.10/jquery.autocomplete.min.jsm', diff --git a/modules/internal/helpers.js b/modules/internal/helpers.js index b687f2c0..1d0a0e8a 100644 --- a/modules/internal/helpers.js +++ b/modules/internal/helpers.js @@ -383,6 +383,8 @@ helpers.setLastVersion = function (type, version) { return '5.13.1'; } else if (type.includes('/hls.js/')) { return '0.13.2'; + } else if (type.includes('/jets/0.')) { + return '0.14.1'; } else if (type.includes('/jquery/1.')) { if (helpers.compareVersion('1.7.1', requestVersion)) return '1.7.1'; // <= v1.7.1 else if (helpers.compareVersion('1.8.3', requestVersion)) return '1.8.3'; // > 1.7.1 to <= 1.8.3 @@ -536,6 +538,7 @@ helpers.compareVersion = function (v1, v2) { }; const ListOfFiles = { + 'jets.min.jsm': 'Jets.js', 'materialize.min.jsm': 'Materialize (JS)', 'materialize.min.css': 'Materialize (CSS)', 'slick.min.jsm': 'slick (JS)', diff --git a/pages/updates/updates.html b/pages/updates/updates.html index 0d153bdc..5b4ccf12 100644 --- a/pages/updates/updates.html +++ b/pages/updates/updates.html @@ -30,6 +30,7 @@
  • Implemented: Different styles for extension icons (#52)
  • Fixed: Bootstrap JS v4.4.1 (#54)
  • Implemented: Collapsible changelog for previous versions(reported by email)
  • +
  • Added: Jets.js v0.14.1 (#56)
  • Generate rule sets for uBlock or uMatrix diff --git a/resources/jets/0.14.1/jets.min.jsm b/resources/jets/0.14.1/jets.min.jsm new file mode 100644 index 00000000..ea32b5db --- /dev/null +++ b/resources/jets/0.14.1/jets.min.jsm @@ -0,0 +1,13 @@ +/*! Jets.js - v0.14.1 - 2018-06-22 +* http://NeXTs.github.com/Jets.js/ +* Copyright (c) 2015 Denis Lukov; Licensed MIT */ + +;(function(d,c){"undefined"!=typeof module?module.exports=c():"function"==typeof define&&"object"==typeof define.amd?define(c):d.Jets=c()})(this,function(){function d(c){if(!(this instanceof d))return new d(c);var a=this,b={searchSelector:"*AND",hideBy:"display:none",diacriticsMap:{}};a.options={};"columns addImportant searchSelector hideBy manualContentHandling callSearchManually searchInSpecificColumn diacriticsMap didSearch invert".split(" ").forEach(function(f){a.options[f]=c[f]||b[f]});if(1":"")+(b.invert?"":":not(")+"[data-jets"+("undefined"!=typeof a?"-col-"+a:"")+b.searchSelector+'="'+e[d]+'"]'+(b.invert?"":")");e=b.hideBy.split(";").filter(Boolean).map(function(a){return a+(b.addImportant?"!important":"")});f=(f?"":this.content_param+">")+h.join(f?",":"")+"{"+e.join(";")+"}";this.styleTag.innerHTML=g.length?f:""},_addStyleTag:function(){this.styleTag=document.createElement("style");document.head.appendChild(this.styleTag)},_getText:function(c){return c&&(c.textContent||c.innerText)|| +""},_sanitize:function(c){return this.replaceDiacritics(c).trim().replace(/\s+/g," ").toLowerCase()},_getContentTags:function(c){return Array.prototype.slice.call(this.content_tag).reduce(function(a,b){return a.concat(Array.prototype.slice.call(b.querySelectorAll(c||":scope > *")))},[])},_handleSpecificColumns:function(c,a){var b=this;b.options.searchInSpecificColumn&&Array.prototype.slice.call(c.children).map(function(g,e){if(!b.options.columns||!b.options.columns.length||-1!=b.options.columns.indexOf(e))c[(a|| +"remove")+"Attribute"]("data-jets-col-"+e,a&&b._sanitize(b._getText(g)))})},_setJets:function(c,a){for(var b=this,g=b._getContentTags(a?"":c),e,f=0,d;d=g[f];f++)if(!d.hasAttribute("data-jets")||a)e=this.options.manualContentHandling?this.options.manualContentHandling(d):b.options.columns&&b.options.columns.length?b.options.columns.map(function(a){return b._getText(d.children[a])}).join(" "):b._getText(d),d.setAttribute("data-jets",b._sanitize(e)),b._handleSpecificColumns(d,"set")},replaceDiacritics:function(c){var a= +this.options.diacriticsMap,b;for(b in a)if(a.hasOwnProperty(b))for(var d=0,e=a[b].length;d :not([data-jets])",c)},_destroy:function(){this.styleTag.parentNode&&document.head.removeChild(this.styleTag);for(var c=this._getContentTags(),a=0,b;b=c[a];a++)b.removeAttribute("data-jets"),this._handleSpecificColumns(b)}};(function(c,a){try{c.querySelector(":scope body")}catch(b){["querySelector","querySelectorAll"].forEach(function(b){var d= +a[b];a[b]=function(a){if(/(^|,)\s*:scope/.test(a)){var e=this.getAttribute("id");this.id="ID_"+Date.now();a=a.replace(/((^|,)\s*):scope/g,"$1#"+this.getAttribute("id"));a=c[b](a);this.id=e;return a}return d.call(this,a)}})}})(window.document,Element.prototype);return d});