diff --git a/bookmarklet-minified.js b/bookmarklet-minified.js index 0840fa6..728a4f9 100644 --- a/bookmarklet-minified.js +++ b/bookmarklet-minified.js @@ -1 +1 @@ -(function(){var numbering=0001,linkColor='',clickOutside=true,showDetails=false,i=['#h5o-outside,#h5o-outside *{background-color:transparent;border:none;border-radius:0;bottom:auto;box-shadow:none;box-sizing:content-box;clear:none;'+(linkColor?'color:'+linkColor+';':'')+'cursor:auto;direction:ltr;float:none;font-family:sans-serif;font-size:small;font-stretch:normal;font-style:normal;font-variant:normal;font-weight:normal;height:auto;left:auto;letter-spacing:normal;line-height:normal;margin:0;opacity:1;outline:none;overflow:visible;padding:0;position:static;right:auto;text-align:left;text-decoration:none;text-indent:0;text-overflow:clip;text-shadow:none;text-transform:none;top:auto;vertical-align:baseline;visibility:visible;white-space:normal;width:auto;word-break:normal;word-spacing:normal;word-wrap:normal;zoom:normal;}','#h5o-inside *:not([href]){color:black;}','#h5o-outside{background-color:transparent;box-sizing:border-box;display:block;height:100%;padding:10px;pointer-events:none;position:fixed;right:0px;top:0px;max-width:500px;z-index:2147483647;}','#h5o-inside{background-color:white;border:2px solid black;box-sizing:border-box;display:block;max-width:100%;max-height:100%;opacity:.9;overflow:auto;padding:10px;pointer-events:auto;}','#h5o-inside ol{counter-reset:li;display:block;margin:0;padding:0;}','#h5o-inside li{counter-increment:li;display:list-item;list-style-type:none;margin-left:'+(numbering===2?'2em':'1.5em')+';position:relative;}','#h5o-inside a{display:inline;}','#h5o-inside a:hover{text-decoration:underline;}','#h5o-inside li.h5o-notitle>a{font-style:italic;}'];if(numbering>0)i.push('#h5o-inside li::before{content:'+(numbering===2?'counters(li,".")':'counter(li)')+'".";display:block;left:-10.5em;position:absolute;text-align:right;width:10em;}');else i.push('#h5o-inside>ol>li{margin-left:0;}');function l(e){var t=document.createElement('ol');for(var n=0;n';if(e.heading)s+='';s+=', '+e.associatedNodes.length+' nodes';n.title=s}t.appendChild(l(e.childSections));return t}function h(e){this.parentSection=null;this.childSections=[];this.firstChild=null;this.lastChild=null;this.appendChild=function(e){e.parentSection=this;this.childSections.push(e);if(this.firstChild===null)this.firstChild=e;this.lastChild=e};this.explicit=e;this.associatedNodes=[]}function p(e){function s(e){if(c(e)){if(!r.isEmpty()&&(b(r.top)||p(r.top))){}else if(p(e)){r.push(e)}else if(v(e)){if(t!==null){if(a(n))l(n);r.push(t)}t=e;n=new h(true);u(t,n);t.appendSection(n)}else if(d(e)){if(t!==null)r.push(t);t=e;t.parentSection=n;n=new h(true);u(t,n);t.appendSection(n)}else if(t===null){}else if(b(e)){if(a(n))n.heading=e;else if(f(t.lastSection)||e.rank>=t.lastSection.heading.rank){n=new h(false);n.heading=e;t.appendSection(n)}else{var i=n;while(e.rank>=i.heading.rank)i=i.parentSection;n=new h(false);n.heading=e;i.appendChild(n)}r.push(e)}}}function o(e){if(c(e)){if(!r.isEmpty()&&e===r.top)r.pop();else if(!r.isEmpty()&&(b(r.top)||p(r.top))){}else if(!r.isEmpty()&&v(e)){if(a(n))l(n);t=r.pop();n=t.lastSection;for(var i=0;i0){e.rank=-t;e.text=n[0].textContent;break}}if(e.rank===undefined){e.rank=-1;e.text=""}}var t=null;var n=null;var r={lastIndex:-1};r.isEmpty=function(){return r.lastIndex===-1};r.push=function(e){r[++r.lastIndex]=e;r.top=e};r.pop=function(){var e=r.top;delete r[r.lastIndex--];r.top=r[r.lastIndex];return e};var i=e;e:while(i){w(i);s(i);if(i.firstChild){i=i.firstChild;continue e}while(i){o(i);if(i===e)break e;if(i.nextSibling){i=i.nextSibling;continue e}i=i.parentNode}}}if(!window.h5o_sdWoNJpsAgQGAaf)window.h5o_sdWoNJpsAgQGAaf=function(){document.removeEventListener('click',h5o_sdWoNJpsAgQGAaf,false);document.body.removeChild(document.getElementById('h5o-outside'))};if(document.getElementById('h5o-outside')){h5o_sdWoNJpsAgQGAaf();return}var s=document.createElement('div');s.id='h5o-outside';var o=document.createElement('style');s.appendChild(o);document.body.appendChild(s);for(var u=0;ua{font-style:italic;}"];if(numbering>0)e.push("#h5o-inside li::before{content:"+(numbering===2?'counters(li,".")':"counter(li)")+'".";display:block;left:-10.5em;position:absolute;text-align:right;width:10em;}');else e.push("#h5o-inside>ol>li{margin-left:0;}");if(!window.h5o_sdWoNJpsAgQGAaf)window.h5o_sdWoNJpsAgQGAaf=function(){document.removeEventListener("click",h5o_sdWoNJpsAgQGAaf,false);document.body.removeChild(document.getElementById("h5o-outside"))};if(document.getElementById("h5o-outside")){h5o_sdWoNJpsAgQGAaf();return}var t=document.createElement("div");t.id="h5o-outside";var n=document.createElement("style");t.appendChild(n);document.body.appendChild(t);for(var i=0;i";if(e.heading)o+="";o+=", "+e.associatedNodes.length+" nodes";n.title=o}t.appendChild(l(e.childSections));return t}function r(e){this.parentSection=null;this.childSections=[];this.firstChild=null;this.lastChild=null;this.appendChild=function(e){e.parentSection=this;this.childSections.push(e);if(this.firstChild===null)this.firstChild=e;this.lastChild=e};this.explicit=e;this.associatedNodes=[]}function d(e){var t=null;var n=null;var i={lastIndex:-1};i.isEmpty=function(){return i.lastIndex===-1};i.push=function(e){i[++i.lastIndex]=e;i.top=e};i.pop=function(){var e=i.top;delete i[i.lastIndex--];i.top=i[i.lastIndex];return e};var o=e;e:while(o){w(o);a(o);if(o.firstChild){o=o.firstChild;continue e}while(o){l(o);if(o===e)break e;if(o.nextSibling){o=o.nextSibling;continue e}o=o.parentNode}}function a(e){if(f(e)){if(!i.isEmpty()&&(v(i.top)||h(i.top))){}else if(h(e)){i.push(e)}else if(m(e)){if(t!==null){if(d(n))u(n);i.push(t)}t=e;n=new r(true);s(t,n);t.appendSection(n)}else if(p(e)){if(t!==null)i.push(t);t=e;t.parentSection=n;n=new r(true);s(t,n);t.appendSection(n)}else if(t===null){}else if(v(e)){if(d(n))n.heading=e;else if(c(t.lastSection)||e.rank>=t.lastSection.heading.rank){n=new r(false);n.heading=e;t.appendSection(n)}else{var o=n;while(e.rank>=o.heading.rank)o=o.parentSection;n=new r(false);n.heading=e;o.appendChild(n)}i.push(e)}}}function l(e){if(f(e)){if(!i.isEmpty()&&e===i.top)i.pop();else if(!i.isEmpty()&&(v(i.top)||h(i.top))){}else if(!i.isEmpty()&&m(e)){if(d(n))u(n);t=i.pop();n=t.lastSection;for(var o=0;o0){e.rank=-t;e.text=n[0].textContent;break}}if(e.rank===undefined){e.rank=-1;e.text=""}}}})(); \ No newline at end of file diff --git a/bookmarklet.js b/bookmarklet.js index caacb6a..ada311c 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -8,7 +8,7 @@ var CSSRules = [ // CSS reset (except: text-rendering, link color) // TODO: directional properties should not be reset "#h5o-outside,#h5o-outside *{\ - background-color:transparent;\ + background:transparent;\ border:none;\ border-radius:0;\ bottom:auto;\ @@ -56,7 +56,7 @@ var CSSRules = [ color:black;\ }", "#h5o-outside{\ - background-color:transparent;\ + background:transparent;\ box-sizing:border-box;\ display:block;\ height:100%;\ @@ -69,7 +69,7 @@ var CSSRules = [ z-index:2147483647;\ }", "#h5o-inside{\ - background-color:white;\ + background:white;\ border:2px solid black;\ box-sizing:border-box;\ display:block;\ @@ -95,6 +95,7 @@ var CSSRules = [ }", "#h5o-inside a{\ display:inline;\ + cursor:pointer;\ }", "#h5o-inside a:hover{\ text-decoration:underline;\