From 950059e0e68a6994b62fb279d61675d8921b5a00 Mon Sep 17 00:00:00 2001 From: bcomnes Date: Sat, 30 Sep 2023 21:55:26 +0000 Subject: [PATCH] 1.0.9 --- CHANGELOG.md | 13 ++++++++++++- dist/out.js | 2 +- dist/version.js | 2 +- package.json | 2 +- 4 files changed, 15 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 777d065..1512aca 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,18 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). -## [v1.0.8](https://github.com/hifiwi-fi/bc-bookmarklet/compare/v1.0.7...v1.0.8) +## [v1.0.9](https://github.com/hifiwi-fi/bc-bookmarklet/compare/v1.0.8...v1.0.9) + +### Merged + +- Bump tap from 16.3.9 to 18.4.0 [`#15`](https://github.com/hifiwi-fi/bc-bookmarklet/pull/15) +- Bump dependency-cruiser from 13.1.5 to 14.0.0 [`#12`](https://github.com/hifiwi-fi/bc-bookmarklet/pull/12) +- Bump actions/checkout from 3 to 4 [`#8`](https://github.com/hifiwi-fi/bc-bookmarklet/pull/8) +- Bump esbuild from 0.18.20 to 0.19.0 [`#7`](https://github.com/hifiwi-fi/bc-bookmarklet/pull/7) +- Bump c8 from 7.14.0 to 8.0.0 [`#6`](https://github.com/hifiwi-fi/bc-bookmarklet/pull/6) +- Bump esbuild from 0.17.19 to 0.18.1 [`#5`](https://github.com/hifiwi-fi/bc-bookmarklet/pull/5) + +## [v1.0.8](https://github.com/hifiwi-fi/bc-bookmarklet/compare/v1.0.7...v1.0.8) - 2023-05-28 ### Merged diff --git a/dist/out.js b/dist/out.js index bc7fa35..0f0d304 100644 --- a/dist/out.js +++ b/dist/out.js @@ -1,5 +1,5 @@ // -var define_DATA_default = { bookmarklet: `javascript:((()=>{var l={ver:"1.0.8"};var p=t=>t?.innerText??t?.textContent??"";var v=[".instapaper_title","article h1",".entry-content h1",".markdown-body h1",".entry-title",".post-title",".pageTitle",".post_title",".headline h1",".headline",".story h1",".entry-header h1",".news_title","#page-post h1",".postheader h1",".postheader h2",".type-post h1"],m=t=>t.replace(/\\r?\\n/g,"").replace(/\\s+/g," ").trim().substring(0,255),y="GitHub - ",P=t=>{for(let o of v){let e=p(t.querySelector(o))?.trim();if(e&&e.length>0)return e}};function w({document:t}){let o=t.location,e=p(t.querySelector("title"))?.replace(/\\r?\\n/g,"");if(o?.hostname?.endsWith("twitter.com")&&o?.pathname?.includes("/status/")){let c=e.split(': "')[0];return m(c)}if(o?.hostname?.endsWith("github.com")){e.startsWith(y)&&(e=e.replace(y,""));let c=e.split(":");return c.length>1?m(c[0]):m(e)}let r=t.querySelector("meta[property='og:title']")?.content;if(r&&r.length>5&&r.length<100)return m(r);let n=t.querySelector("meta[name='twitter:title']")?.content;if(n&&n.length>5&&n.length<100)return m(n);let s=P(t);return s&&s.length>5&&s.length<100?m(s):m(e)}var g=t=>t?.getAttribute("content")||t?.getAttribute("value");var h=t=>t?.replace(/\\s+/g," ").trim()||"";function T({document:t,title:o}){let e=t.location,r=String(t?.getSelection());if(r&&r.length>1)return h(r);if(e?.hostname?.endsWith("twitter.com")&&e?.pathname?.includes("/status/"))return(p(t.querySelector("title"))?.replace(/\\r?\\n/g,"")).split(': "')[1].split('" / Twitter')[0];let n=f(t);return h(b(n?{summary:n,title:o}:{summary:W(t),title:o}))}function b({title:t,summary:o}){return o?.replace(t,"")||o}function f(t){let o=g(t.querySelector("meta[name='description'],meta[description]"));if(o)return h(o);let e=g(t.querySelector("meta[property='og:description']"));if(e)return h(e);let r=g(t.querySelector("meta[name='twitter:description']"));return r?h(r):""}function W(t){return p(t.querySelector("article p"))?.replace(/\\r?\\n/g,"")?.replace(/\\s+/g," ")?.trim()}function S({document:t,title:o,summary:e}){let r=t.location,n=new Set,s=[u(o),u(e)],c=f(t);c&&s.push(u(c));let d=g(t.querySelector('meta[name="keywords"],meta[itemprop="keywords"]'));d&&s.push(u(d));let k=s.join(" ");for(let[i,a]of Object.entries($))k.includes(i)&&n.add(a);if(r?.hostname?.endsWith("github.com")){if(t.querySelector(".h-card")){n.add("person");let a=t.querySelector(".p-nickname").innerText;a&&n.add(\`gh:\${a}\`)}let i=r?.pathname?.split("/");i.length>=3&&(n.add("repo"),n.add(\`gh:\${i[1]}\`))}if(r?.hostname?.endsWith("twitter.com")){let i=r?.pathname?.split("/");if(r?.pathname?.includes("/status/")&&n.add("tweet"),i.length>=2){let a=i[1];n.add(\`twtr:\${a}\`)}}for(let[i,a]of Object.entries(C))(i instanceof RegExp?i:new RegExp("\\\\b"+i+"\\\\b","i")).test(t?.location?.href)&&n.add(a);return Array.from(n)}function u(t){return t.toLowerCase()}var $={javascript:"javascript",js:"javascript",clojure:"clojure",clj:"clojure",clojurescript:"clojurescript",cljs:"clojurescript",python:"python",ios:"ios",video:"video",books:"book",book:"book"},C={"medium.com/([^/]+)$":"blog","medium.com/([^/]+)/.*":"blog-posting","stackoverflow.com/questions/\\\\d+/[^/]+/\\\\d+":"answer","stackoverflow.com/questions/\\\\d+/[^/]+/?$":"question","nytimes.com":"article","washingtonpost.com":"article","youtube.com/watch":"video","vimeo.com/\\\\d+":"video","imdb.com/title":"movie","imdb.com/name":"person","news.ycombinator.com/item":"comment","reddit.com":"comment","blog.":"blog","schema.org/\\\\S+":"type","goodreads.com/book/show/":"book"};function x(t){let o=w({document:t}),e=T({document:t,title:o}),r=S({document:t,title:o,summary:e});return{title:o,summary:e,tags:r}}var{ver:D}=l,M=800,O=710,R=location.href,{title:A,summary:_,tags:E}=x(document),j=new URLSearchParams({url:R,title:A,summary:_,ver:D,jump:"close"});for(let t of E)j.append("tags",t);window.open(\`TRANSPORT://HOST/bookmarks/add?\${j.toString()}\`,"WINDOW_TITLE",\`toolbar=no,width=\${O},height=\${M}\`);})())` }; +var define_DATA_default = { bookmarklet: `javascript:((()=>{var l={ver:"1.0.9"};var p=t=>t?.innerText??t?.textContent??"";var v=[".instapaper_title","article h1",".entry-content h1",".markdown-body h1",".entry-title",".post-title",".pageTitle",".post_title",".headline h1",".headline",".story h1",".entry-header h1",".news_title","#page-post h1",".postheader h1",".postheader h2",".type-post h1"],m=t=>t.replace(/\\r?\\n/g,"").replace(/\\s+/g," ").trim().substring(0,255),y="GitHub - ",P=t=>{for(let o of v){let e=p(t.querySelector(o))?.trim();if(e&&e.length>0)return e}};function w({document:t}){let o=t.location,e=p(t.querySelector("title"))?.replace(/\\r?\\n/g,"");if(o?.hostname?.endsWith("twitter.com")&&o?.pathname?.includes("/status/")){let c=e.split(': "')[0];return m(c)}if(o?.hostname?.endsWith("github.com")){e.startsWith(y)&&(e=e.replace(y,""));let c=e.split(":");return c.length>1?m(c[0]):m(e)}let r=t.querySelector("meta[property='og:title']")?.content;if(r&&r.length>5&&r.length<100)return m(r);let n=t.querySelector("meta[name='twitter:title']")?.content;if(n&&n.length>5&&n.length<100)return m(n);let s=P(t);return s&&s.length>5&&s.length<100?m(s):m(e)}var g=t=>t?.getAttribute("content")||t?.getAttribute("value");var h=t=>t?.replace(/\\s+/g," ").trim()||"";function T({document:t,title:o}){let e=t.location,r=String(t?.getSelection());if(r&&r.length>1)return h(r);if(e?.hostname?.endsWith("twitter.com")&&e?.pathname?.includes("/status/"))return(p(t.querySelector("title"))?.replace(/\\r?\\n/g,"")).split(': "')[1].split('" / Twitter')[0];let n=f(t);return h(b(n?{summary:n,title:o}:{summary:W(t),title:o}))}function b({title:t,summary:o}){return o?.replace(t,"")||o}function f(t){let o=g(t.querySelector("meta[name='description'],meta[description]"));if(o)return h(o);let e=g(t.querySelector("meta[property='og:description']"));if(e)return h(e);let r=g(t.querySelector("meta[name='twitter:description']"));return r?h(r):""}function W(t){return p(t.querySelector("article p"))?.replace(/\\r?\\n/g,"")?.replace(/\\s+/g," ")?.trim()}function S({document:t,title:o,summary:e}){let r=t.location,n=new Set,s=[u(o),u(e)],c=f(t);c&&s.push(u(c));let d=g(t.querySelector('meta[name="keywords"],meta[itemprop="keywords"]'));d&&s.push(u(d));let k=s.join(" ");for(let[i,a]of Object.entries($))k.includes(i)&&n.add(a);if(r?.hostname?.endsWith("github.com")){if(t.querySelector(".h-card")){n.add("person");let a=t.querySelector(".p-nickname").innerText;a&&n.add(\`gh:\${a}\`)}let i=r?.pathname?.split("/");i.length>=3&&(n.add("repo"),n.add(\`gh:\${i[1]}\`))}if(r?.hostname?.endsWith("twitter.com")){let i=r?.pathname?.split("/");if(r?.pathname?.includes("/status/")&&n.add("tweet"),i.length>=2){let a=i[1];n.add(\`twtr:\${a}\`)}}for(let[i,a]of Object.entries(C))(i instanceof RegExp?i:new RegExp("\\\\b"+i+"\\\\b","i")).test(t?.location?.href)&&n.add(a);return Array.from(n)}function u(t){return t.toLowerCase()}var $={javascript:"javascript",js:"javascript",clojure:"clojure",clj:"clojure",clojurescript:"clojurescript",cljs:"clojurescript",python:"python",ios:"ios",video:"video",books:"book",book:"book"},C={"medium.com/([^/]+)$":"blog","medium.com/([^/]+)/.*":"blog-posting","stackoverflow.com/questions/\\\\d+/[^/]+/\\\\d+":"answer","stackoverflow.com/questions/\\\\d+/[^/]+/?$":"question","nytimes.com":"article","washingtonpost.com":"article","youtube.com/watch":"video","vimeo.com/\\\\d+":"video","imdb.com/title":"movie","imdb.com/name":"person","news.ycombinator.com/item":"comment","reddit.com":"comment","blog.":"blog","schema.org/\\\\S+":"type","goodreads.com/book/show/":"book"};function x(t){let o=w({document:t}),e=T({document:t,title:o}),r=S({document:t,title:o,summary:e});return{title:o,summary:e,tags:r}}var{ver:D}=l,M=800,O=710,R=location.href,{title:A,summary:_,tags:E}=x(document),j=new URLSearchParams({url:R,title:A,summary:_,ver:D,jump:"close"});for(let t of E)j.append("tags",t);window.open(\`TRANSPORT://HOST/bookmarks/add?\${j.toString()}\`,"WINDOW_TITLE",\`toolbar=no,width=\${O},height=\${M}\`);})())` }; // scripts/wrapper.js function getBookmarklet(vars = {}) { diff --git a/dist/version.js b/dist/version.js index bffbf51..19bc702 100644 --- a/dist/version.js +++ b/dist/version.js @@ -1,5 +1,5 @@ // -var define_PKG_default = { ver: "1.0.8" }; +var define_PKG_default = { ver: "1.0.9" }; // scripts/version.js var { ver } = define_PKG_default; diff --git a/package.json b/package.json index 8ec73a1..b432be2 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,7 @@ "dist/*.js.map", "./version.js" ], - "version": "1.0.8", + "version": "1.0.9", "author": "Bret Comnes (https://bret.io)", "bugs": { "url": "https://github.com/hifiwi-fi/bc-bookmarklet/issues"