Created
February 8, 2021 14:05
-
-
Save kotet/c5771b1d350116702ec02abac8afcd12 to your computer and use it in GitHub Desktop.
AtCoderのコンテストトップページで発動するとGoogle Calenderの予定を作って開くブックマークレット
This file contains 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 characters
(function(){var a=function(c){return c.getUTCFullYear()+(""+(101+c.getUTCMonth())).slice(1,3)+(""+(100+c.getUTCDate())).slice(1,3)+"T"+(""+(100+c.getUTCHours())).slice(1,3)+(""+(100+c.getUTCMinutes())).slice(1,3)+"00Z"},b=encodeURI,d=document.querySelector("#contest-nav-tabs > div > small.contest-duration"),e=b(a(new Date(d.querySelector("a:nth-child(1) > time").innerText)));a=b(a(new Date(d.querySelector("a:nth-child(2) > time").innerText)));d=b(document.title);var f=b(location.href);b=b(document.querySelector("#main-container > div.row > div:nth-child(2) > p").innerText);window.open("https://www.google.com/calendar/render?action=TEMPLATE&text="+d+"&details="+b+"&location="+f+"&dates="+e+"%2F"+a,"_blank")})(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment