h5o-chrome
Advanced tools
Comparing version 0.8.12 to 0.8.13
@@ -39,3 +39,3 @@ { | ||
}, | ||
"version": "0.8.12", | ||
"version": "0.8.13", | ||
"author": { | ||
@@ -42,0 +42,0 @@ "name": "Dominykas Blyžė", |
@@ -11,2 +11,2 @@ /** | ||
*/ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.HTML5Outline=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){b.exports=a("./src/createOutline")},{"./src/createOutline":6}],2:[function(a,b,c){function d(a,b){this.startingNode=a.node,this.sections=[b]}var e=a("./asHTML");d.prototype.getLastSection=function(){return this.sections[this.sections.length-1]},d.prototype.asHTML=function(a){return e(this.sections,a)},b.exports=d},{"./asHTML":5}],3:[function(a,b,c){function d(a){this.node=a}b.exports=d},{}],4:[function(a,b,c){function d(a){this.sections=[],this.startingNode=a}d.prototype.append=function(a){a.container=this,this.sections.push(a)},b.exports=d},{}],5:[function(a,b,c){function d(a){if(a.heading.implied)return"<i>Untitled "+g.getTagName(a.startingNode)+"</i>";var b=g.getRankingHeadingElement(a.heading);if(!b)return"<i>Error: no H1-H6 inside HGROUP</i>";var c=b.textContent;return c?g.escapeHtml(c):"<i>No text content inside "+g.getTagName(b)+"</i>"}function e(a,b){var c=a.startingNode.getAttribute("id");if(c)return c;if(!a.heading.implied){var d=a.heading.getAttribute("id");if(d)return d}var e=a.startingNode;do var f="h5o-"+ ++b.linkCounter;while(e.ownerDocument.getElementById(f));return e.setAttribute("id",f),f}function f(a,b){if("object"!=typeof b&&(b={createLinks:!!b}),!a.length)return"";if(b.skipTopHeader)return f(a[0].sections,{skipToHeader:!1,createLinks:b.createLinks});"undefined"==typeof b.linkCounter&&(b.linkCounter=0);var c=!!b.createLinks,g=[];g.push("<ol>");for(var h=0;h<a.length;h++){var i=a[h];g.push("<li>"),c&&g.push('<a href="#'+e(i,b)+'">'),g.push(d(i)),c&&g.push("</a>"),g.push(f(i.sections,b)),g.push("</li>")}return g.push("</ol>"),g.join("")}var g=a("./utils");b.exports=f},{"./utils":7}],6:[function(a,b,c){function d(){return k.length?k[k.length-1].node:void 0}function e(a){var b=p.getRankingHeadingElement(a);return b?-parseInt(p.getTagName(b).substr(1)):-1}function f(a){var b=d();if(!p.isHeading(b)&&!p.hasHiddenAttribute(b)){if(p.hasHiddenAttribute(a))return void k.push({node:a});if(p.isSecContent(a))return null!=i&&(j.heading||(j.heading={implied:!0}),k.push(i)),i=new n(a),j=new l(a),void(i.outline=new m(i.node,j));if(p.isSecRoot(a))return null!=i&&k.push(i),i=new n(a),i.parentSection=j,j=new l(a),void(i.outline=new m(i.node,j));if(p.isHeading(a)){if(j.heading)if(i.outline.getLastSection().heading.implied||e(a)>=e(i.outline.getLastSection().heading)){var c=new l(a);i.outline.sections.push(c),j=c,j.heading=a}else{var f=!1,g=j;do{if(e(a)<e(g.heading)){var c=new l(a);g.append(c),j=c,j.heading=a,f=!0}var h=g.container;g=h}while(!f)}else j.heading=a;return void k.push({node:a})}}}function g(a){var b=d();if(b===a&&k.pop(),!p.isHeading(b)&&!p.hasHiddenAttribute(b)){if(!(p.isSecContent(a)&&k.length>0))return p.isSecRoot(a)&&k.length>0?(j.heading||(j.heading={implied:!0}),j=i.parentSection,void(i=k.pop())):p.isSecContent(a)||p.isSecRoot(a)?void(j.heading||(j.heading={implied:!0})):void 0;j.heading||(j.heading={implied:!0});var c=i;i=k.pop(),j=i.outline.getLastSection();for(var e=0;e<c.outline.sections.length;e++)j.append(c.outline.sections[e])}}function h(a){if(!p.isSecContent(a)&&!p.isSecRoot(a))throw new TypeError("Invalid argument: start element must either be sectioning root or sectioning content.");return i=null,j=null,k=[],o(a,f,g),i.outline}var i,j,k,l=a("./Section"),m=a("./Outline"),n=a("./OutlineTarget"),o=a("./walk"),p=a("./utils");b.exports=h},{"./Outline":2,"./OutlineTarget":3,"./Section":4,"./utils":7,"./walk":8}],7:[function(a,b,c){function d(a){return a.tagName.toUpperCase()}function e(a){return function(b){return f(b)&&new RegExp(a,"i").test(d(b))}}function f(a){return a&&a.tagName}function g(a){if(!j(a))throw new Error("Not a heading element");var b=d(a);if("HGROUP"!==b)return a;for(var c=1;6>=c;c++){var e=a.getElementsByTagName("H"+c);if(e.length)return e[0]}return null}function h(a){return(""+a).replace(/&/g,"&").replace(/</g,"<")}function i(a){return f(a)&&a.hasAttribute("hidden")}var j=e("^H[1-6]|HGROUP$");c.getTagName=d,c.hasHiddenAttribute=i,c.isSecRoot=e("^BLOCKQUOTE|BODY|DETAILS|FIELDSET|FIGURE|TD$"),c.isSecContent=e("^ARTICLE|ASIDE|NAV|SECTION$"),c.isHeading=j,c.getRankingHeadingElement=g,c.escapeHtml=h},{}],8:[function(a,b,c){b.exports=function(a,b,c){var d=a;a:for(;d;)if(b(d),d.firstChild)d=d.firstChild;else for(;d;){if(c(d),d.nextSibling){d=d.nextSibling;continue a}d=d==a?null:d.parentNode}}},{}]},{},[1])(1)}); | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.HTML5Outline=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){b.exports=a("./src/createOutline")},{"./src/createOutline":6}],2:[function(a,b){function c(a,b){this.startingNode=a.node,this.sections=[b]}var d=a("./asHTML");c.prototype.getLastSection=function(){return this.sections[this.sections.length-1]},c.prototype.asHTML=function(a){return d(this.sections,a)},b.exports=c},{"./asHTML":5}],3:[function(a,b){function c(a){this.node=a}b.exports=c},{}],4:[function(a,b){function c(a){this.sections=[],this.startingNode=a}c.prototype.append=function(a){a.container=this,this.sections.push(a)},b.exports=c},{}],5:[function(a,b){function c(a){if(a.heading.implied)return"<i>Untitled "+f.getTagName(a.startingNode)+"</i>";var b=f.getRankingHeadingElement(a.heading);if(!b)return"<i>Error: no H1-H6 inside HGROUP</i>";var c=b.textContent;return c?f.escapeHtml(c):"<i>No text content inside "+f.getTagName(b)+"</i>"}function d(a,b){var c=a.startingNode.getAttribute("id");if(c)return c;if(!a.heading.implied){var d=a.heading.getAttribute("id");if(d)return d}var e=a.startingNode;do var f="h5o-"+ ++b.linkCounter;while(e.ownerDocument.getElementById(f));return e.setAttribute("id",f),f}function e(a,b){if("object"!=typeof b&&(b={createLinks:!!b}),!a.length)return"";if(b.skipTopHeader)return e(a[0].sections,{skipToHeader:!1,createLinks:b.createLinks});"undefined"==typeof b.linkCounter&&(b.linkCounter=0);var f=!!b.createLinks,g=[];g.push("<ol>");for(var h=0;h<a.length;h++){var i=a[h];g.push("<li>"),f&&g.push('<a href="#'+d(i,b)+'">'),g.push(c(i)),f&&g.push("</a>"),g.push(e(i.sections,b)),g.push("</li>")}return g.push("</ol>"),g.join("")}var f=a("./utils");b.exports=e},{"./utils":7}],6:[function(a,b){function c(){return j.length?j[j.length-1].node:void 0}function d(a){var b=o.getRankingHeadingElement(a);return b?-parseInt(o.getTagName(b).substr(1)):-1}function e(a){var b=c();if(!o.isHeading(b)&&!o.hasHiddenAttribute(b)){if(o.hasHiddenAttribute(a))return void j.push({node:a});if(o.isSecContent(a))return null!=h&&(i.heading||(i.heading={implied:!0}),j.push(h)),h=new m(a),i=new k(a),void(h.outline=new l(h.node,i));if(o.isSecRoot(a))return null!=h&&j.push(h),h=new m(a),h.parentSection=i,i=new k(a),void(h.outline=new l(h.node,i));if(o.isHeading(a)){if(i.heading)if(h.outline.getLastSection().heading.implied||d(a)>=d(h.outline.getLastSection().heading)){var e=new k(a);h.outline.sections.push(e),i=e,i.heading=a}else{var f=!1,g=i;do{if(d(a)<d(g.heading)){var e=new k(a);g.append(e),i=e,i.heading=a,f=!0}var n=g.container;g=n}while(!f)}else i.heading=a;return void j.push({node:a})}}}function f(a){var b=c();if(b===a&&j.pop(),!o.isHeading(b)&&!o.hasHiddenAttribute(b)){if(!(o.isSecContent(a)&&j.length>0))return o.isSecRoot(a)&&j.length>0?(i.heading||(i.heading={implied:!0}),i=h.parentSection,void(h=j.pop())):o.isSecContent(a)||o.isSecRoot(a)?void(i.heading||(i.heading={implied:!0})):void 0;i.heading||(i.heading={implied:!0});var d=h;h=j.pop(),i=h.outline.getLastSection();for(var e=0;e<d.outline.sections.length;e++)i.append(d.outline.sections[e])}}function g(a){if(!o.isSecContent(a)&&!o.isSecRoot(a))throw new TypeError("Invalid argument: start element must either be sectioning root or sectioning content.");return h=null,i=null,j=[],n(a,e,f),h.outline}var h,i,j,k=a("./Section"),l=a("./Outline"),m=a("./OutlineTarget"),n=a("./walk"),o=a("./utils");b.exports=g},{"./Outline":2,"./OutlineTarget":3,"./Section":4,"./utils":7,"./walk":8}],7:[function(a,b,c){function d(a){return a.tagName.toUpperCase()}function e(a){return function(b){return f(b)&&new RegExp(a,"i").test(d(b))}}function f(a){return a&&a.tagName}function g(a){if(!j(a))throw new Error("Not a heading element");var b=d(a);if("HGROUP"!==b)return a;for(var c=1;6>=c;c++){var e=a.getElementsByTagName("H"+c);if(e.length)return e[0]}return null}function h(a){return(""+a).replace(/&/g,"&").replace(/</g,"<")}function i(a){return f(a)&&a.hasAttribute("hidden")}var j=e("^H[1-6]|HGROUP$");c.getTagName=d,c.hasHiddenAttribute=i,c.isSecRoot=e("^(BLOCKQUOTE|BODY|DETAILS|FIELDSET|FIGURE|TD)$"),c.isSecContent=e("^(ARTICLE|ASIDE|NAV|SECTION)$"),c.isHeading=j,c.getRankingHeadingElement=g,c.escapeHtml=h},{}],8:[function(a,b){b.exports=function(a,b,c){var d=a;a:for(;d;)if(b(d),d.firstChild)d=d.firstChild;else for(;d;){if(c(d),d.nextSibling){d=d.nextSibling;continue a}d=d==a?null:d.parentNode}}},{}]},{},[1])(1)}); |
@@ -37,3 +37,3 @@ { | ||
}, | ||
"version": "0.8.12", | ||
"version": "0.8.13", | ||
"author": { | ||
@@ -40,0 +40,0 @@ "name": "Dominykas Blyžė", |
@@ -11,2 +11,2 @@ /** | ||
*/ | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.HTML5Outline=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b,c){b.exports=a("./src/createOutline")},{"./src/createOutline":6}],2:[function(a,b,c){function d(a,b){this.startingNode=a.node,this.sections=[b]}var e=a("./asHTML");d.prototype.getLastSection=function(){return this.sections[this.sections.length-1]},d.prototype.asHTML=function(a){return e(this.sections,a)},b.exports=d},{"./asHTML":5}],3:[function(a,b,c){function d(a){this.node=a}b.exports=d},{}],4:[function(a,b,c){function d(a){this.sections=[],this.startingNode=a}d.prototype.append=function(a){a.container=this,this.sections.push(a)},b.exports=d},{}],5:[function(a,b,c){function d(a){if(a.heading.implied)return"<i>Untitled "+g.getTagName(a.startingNode)+"</i>";var b=g.getRankingHeadingElement(a.heading);if(!b)return"<i>Error: no H1-H6 inside HGROUP</i>";var c=b.textContent;return c?g.escapeHtml(c):"<i>No text content inside "+g.getTagName(b)+"</i>"}function e(a,b){var c=a.startingNode.getAttribute("id");if(c)return c;if(!a.heading.implied){var d=a.heading.getAttribute("id");if(d)return d}var e=a.startingNode;do var f="h5o-"+ ++b.linkCounter;while(e.ownerDocument.getElementById(f));return e.setAttribute("id",f),f}function f(a,b){if("object"!=typeof b&&(b={createLinks:!!b}),!a.length)return"";if(b.skipTopHeader)return f(a[0].sections,{skipToHeader:!1,createLinks:b.createLinks});"undefined"==typeof b.linkCounter&&(b.linkCounter=0);var c=!!b.createLinks,g=[];g.push("<ol>");for(var h=0;h<a.length;h++){var i=a[h];g.push("<li>"),c&&g.push('<a href="#'+e(i,b)+'">'),g.push(d(i)),c&&g.push("</a>"),g.push(f(i.sections,b)),g.push("</li>")}return g.push("</ol>"),g.join("")}var g=a("./utils");b.exports=f},{"./utils":7}],6:[function(a,b,c){function d(){return k.length?k[k.length-1].node:void 0}function e(a){var b=p.getRankingHeadingElement(a);return b?-parseInt(p.getTagName(b).substr(1)):-1}function f(a){var b=d();if(!p.isHeading(b)&&!p.hasHiddenAttribute(b)){if(p.hasHiddenAttribute(a))return void k.push({node:a});if(p.isSecContent(a))return null!=i&&(j.heading||(j.heading={implied:!0}),k.push(i)),i=new n(a),j=new l(a),void(i.outline=new m(i.node,j));if(p.isSecRoot(a))return null!=i&&k.push(i),i=new n(a),i.parentSection=j,j=new l(a),void(i.outline=new m(i.node,j));if(p.isHeading(a)){if(j.heading)if(i.outline.getLastSection().heading.implied||e(a)>=e(i.outline.getLastSection().heading)){var c=new l(a);i.outline.sections.push(c),j=c,j.heading=a}else{var f=!1,g=j;do{if(e(a)<e(g.heading)){var c=new l(a);g.append(c),j=c,j.heading=a,f=!0}var h=g.container;g=h}while(!f)}else j.heading=a;return void k.push({node:a})}}}function g(a){var b=d();if(b===a&&k.pop(),!p.isHeading(b)&&!p.hasHiddenAttribute(b)){if(!(p.isSecContent(a)&&k.length>0))return p.isSecRoot(a)&&k.length>0?(j.heading||(j.heading={implied:!0}),j=i.parentSection,void(i=k.pop())):p.isSecContent(a)||p.isSecRoot(a)?void(j.heading||(j.heading={implied:!0})):void 0;j.heading||(j.heading={implied:!0});var c=i;i=k.pop(),j=i.outline.getLastSection();for(var e=0;e<c.outline.sections.length;e++)j.append(c.outline.sections[e])}}function h(a){if(!p.isSecContent(a)&&!p.isSecRoot(a))throw new TypeError("Invalid argument: start element must either be sectioning root or sectioning content.");return i=null,j=null,k=[],o(a,f,g),i.outline}var i,j,k,l=a("./Section"),m=a("./Outline"),n=a("./OutlineTarget"),o=a("./walk"),p=a("./utils");b.exports=h},{"./Outline":2,"./OutlineTarget":3,"./Section":4,"./utils":7,"./walk":8}],7:[function(a,b,c){function d(a){return a.tagName.toUpperCase()}function e(a){return function(b){return f(b)&&new RegExp(a,"i").test(d(b))}}function f(a){return a&&a.tagName}function g(a){if(!j(a))throw new Error("Not a heading element");var b=d(a);if("HGROUP"!==b)return a;for(var c=1;6>=c;c++){var e=a.getElementsByTagName("H"+c);if(e.length)return e[0]}return null}function h(a){return(""+a).replace(/&/g,"&").replace(/</g,"<")}function i(a){return f(a)&&a.hasAttribute("hidden")}var j=e("^H[1-6]|HGROUP$");c.getTagName=d,c.hasHiddenAttribute=i,c.isSecRoot=e("^BLOCKQUOTE|BODY|DETAILS|FIELDSET|FIGURE|TD$"),c.isSecContent=e("^ARTICLE|ASIDE|NAV|SECTION$"),c.isHeading=j,c.getRankingHeadingElement=g,c.escapeHtml=h},{}],8:[function(a,b,c){b.exports=function(a,b,c){var d=a;a:for(;d;)if(b(d),d.firstChild)d=d.firstChild;else for(;d;){if(c(d),d.nextSibling){d=d.nextSibling;continue a}d=d==a?null:d.parentNode}}},{}]},{},[1])(1)}); | ||
!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.HTML5Outline=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;g<d.length;g++)e(d[g]);return e}({1:[function(a,b){b.exports=a("./src/createOutline")},{"./src/createOutline":6}],2:[function(a,b){function c(a,b){this.startingNode=a.node,this.sections=[b]}var d=a("./asHTML");c.prototype.getLastSection=function(){return this.sections[this.sections.length-1]},c.prototype.asHTML=function(a){return d(this.sections,a)},b.exports=c},{"./asHTML":5}],3:[function(a,b){function c(a){this.node=a}b.exports=c},{}],4:[function(a,b){function c(a){this.sections=[],this.startingNode=a}c.prototype.append=function(a){a.container=this,this.sections.push(a)},b.exports=c},{}],5:[function(a,b){function c(a){if(a.heading.implied)return"<i>Untitled "+f.getTagName(a.startingNode)+"</i>";var b=f.getRankingHeadingElement(a.heading);if(!b)return"<i>Error: no H1-H6 inside HGROUP</i>";var c=b.textContent;return c?f.escapeHtml(c):"<i>No text content inside "+f.getTagName(b)+"</i>"}function d(a,b){var c=a.startingNode.getAttribute("id");if(c)return c;if(!a.heading.implied){var d=a.heading.getAttribute("id");if(d)return d}var e=a.startingNode;do var f="h5o-"+ ++b.linkCounter;while(e.ownerDocument.getElementById(f));return e.setAttribute("id",f),f}function e(a,b){if("object"!=typeof b&&(b={createLinks:!!b}),!a.length)return"";if(b.skipTopHeader)return e(a[0].sections,{skipToHeader:!1,createLinks:b.createLinks});"undefined"==typeof b.linkCounter&&(b.linkCounter=0);var f=!!b.createLinks,g=[];g.push("<ol>");for(var h=0;h<a.length;h++){var i=a[h];g.push("<li>"),f&&g.push('<a href="#'+d(i,b)+'">'),g.push(c(i)),f&&g.push("</a>"),g.push(e(i.sections,b)),g.push("</li>")}return g.push("</ol>"),g.join("")}var f=a("./utils");b.exports=e},{"./utils":7}],6:[function(a,b){function c(){return j.length?j[j.length-1].node:void 0}function d(a){var b=o.getRankingHeadingElement(a);return b?-parseInt(o.getTagName(b).substr(1)):-1}function e(a){var b=c();if(!o.isHeading(b)&&!o.hasHiddenAttribute(b)){if(o.hasHiddenAttribute(a))return void j.push({node:a});if(o.isSecContent(a))return null!=h&&(i.heading||(i.heading={implied:!0}),j.push(h)),h=new m(a),i=new k(a),void(h.outline=new l(h.node,i));if(o.isSecRoot(a))return null!=h&&j.push(h),h=new m(a),h.parentSection=i,i=new k(a),void(h.outline=new l(h.node,i));if(o.isHeading(a)){if(i.heading)if(h.outline.getLastSection().heading.implied||d(a)>=d(h.outline.getLastSection().heading)){var e=new k(a);h.outline.sections.push(e),i=e,i.heading=a}else{var f=!1,g=i;do{if(d(a)<d(g.heading)){var e=new k(a);g.append(e),i=e,i.heading=a,f=!0}var n=g.container;g=n}while(!f)}else i.heading=a;return void j.push({node:a})}}}function f(a){var b=c();if(b===a&&j.pop(),!o.isHeading(b)&&!o.hasHiddenAttribute(b)){if(!(o.isSecContent(a)&&j.length>0))return o.isSecRoot(a)&&j.length>0?(i.heading||(i.heading={implied:!0}),i=h.parentSection,void(h=j.pop())):o.isSecContent(a)||o.isSecRoot(a)?void(i.heading||(i.heading={implied:!0})):void 0;i.heading||(i.heading={implied:!0});var d=h;h=j.pop(),i=h.outline.getLastSection();for(var e=0;e<d.outline.sections.length;e++)i.append(d.outline.sections[e])}}function g(a){if(!o.isSecContent(a)&&!o.isSecRoot(a))throw new TypeError("Invalid argument: start element must either be sectioning root or sectioning content.");return h=null,i=null,j=[],n(a,e,f),h.outline}var h,i,j,k=a("./Section"),l=a("./Outline"),m=a("./OutlineTarget"),n=a("./walk"),o=a("./utils");b.exports=g},{"./Outline":2,"./OutlineTarget":3,"./Section":4,"./utils":7,"./walk":8}],7:[function(a,b,c){function d(a){return a.tagName.toUpperCase()}function e(a){return function(b){return f(b)&&new RegExp(a,"i").test(d(b))}}function f(a){return a&&a.tagName}function g(a){if(!j(a))throw new Error("Not a heading element");var b=d(a);if("HGROUP"!==b)return a;for(var c=1;6>=c;c++){var e=a.getElementsByTagName("H"+c);if(e.length)return e[0]}return null}function h(a){return(""+a).replace(/&/g,"&").replace(/</g,"<")}function i(a){return f(a)&&a.hasAttribute("hidden")}var j=e("^H[1-6]|HGROUP$");c.getTagName=d,c.hasHiddenAttribute=i,c.isSecRoot=e("^(BLOCKQUOTE|BODY|DETAILS|FIELDSET|FIGURE|TD)$"),c.isSecContent=e("^(ARTICLE|ASIDE|NAV|SECTION)$"),c.isHeading=j,c.getRankingHeadingElement=g,c.escapeHtml=h},{}],8:[function(a,b){b.exports=function(a,b,c){var d=a;a:for(;d;)if(b(d),d.firstChild)d=d.firstChild;else for(;d;){if(c(d),d.nextSibling){d=d.nextSibling;continue a}d=d==a?null:d.parentNode}}},{}]},{},[1])(1)}); |
{ | ||
"name": "h5o-chrome", | ||
"version": "0.8.12", | ||
"version": "0.8.13", | ||
"description": "Extension for Google Chrome / Chromium to generate a navigable page outline based on HTML5 outlining algorithm", | ||
@@ -44,3 +44,3 @@ "scripts": { | ||
"grunt-gh-pages": "0.10.x", | ||
"h5o": "0.10.x", | ||
"h5o": "0.11.x", | ||
"in-publish": "1.x", | ||
@@ -47,0 +47,0 @@ "load-grunt-tasks": "3.1.x", |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
1
131765