Last active
September 19, 2020 17:16
-
-
Save ykessler/750c9b599a92c29e897b0b7ff93b0ed2 to your computer and use it in GitHub Desktop.
Revisions
-
ykessler revised this gist
Sep 19, 2020 . 1 changed file with 13 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1,13 @@ javascript: var og_site = document.querySelector("meta[property='og:site_name']").getAttribute('content'); var og_title = document.querySelector("meta[property='og:title']").getAttribute('content'); var og_desc = document.querySelector("meta[property='og:description']").getAttribute('content').replace(/\s+/g, " "); var channel = (og_site == 'YouTube') ? document.querySelector("a.ytp-ce-channel-title").text : null; var title = og_title ? `${og_title}` : document.title; if(channel){title = `${title} - ${channel}`}; if(og_site){title = `${title} - ${og_site}`}; if (title) { var re = /(\\|\/|:|\*|\?|\"|<|>|\|)/gi; title = title.replace(re, ''); link = `[${title}](${window.location}) - __${og_desc}__`; void(prompt('Markdown snnip', link)); } -
ykessler revised this gist
Sep 6, 2020 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1 +1 @@ javascript:var og_site=document.querySelector("meta[property='og:site_name']").getAttribute('content');var og_title=document.querySelector("meta[property='og:title']").getAttribute('content');var og_desc=document.querySelector("meta[property='og:description']").getAttribute('content').replace(/\s+/g," ");var title=og_title ? `${og_title} - ${og_site}` : document.title;if(title){var re=/(\\|\/|:|\*|\?|\"|<|>|\|)/gi;title=title.replace(re,'');link=`[${title}](${window.location}) - __${og_desc}__`;void(prompt('Markdown snnip', link));} -
ykessler revised this gist
Sep 6, 2020 . No changes.There are no files selected for viewing
-
ykessler revised this gist
Sep 6, 2020 . No changes.There are no files selected for viewing
-
ykessler renamed this gist
Sep 6, 2020 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
ykessler created this gist
Sep 6, 2020 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1 @@ javascript:var title=document.title;var desc=document.querySelector("meta[property='og:description']").getAttribute('content').replace(/\s+/g," ");if(title){var re=/(\\|\/|:|\*|\?|\"|<|>|\|)/gi;link=`[${title.replace(re,'')}](${window.location}) - __${desc}__`;void(prompt('Markdown link', link));}