Last active
January 22, 2019 23:32
-
-
Save UnquietCode/c8dba8a5e8f0bea43ac7aa75f0277142 to your computer and use it in GitHub Desktop.
Revisions
-
UnquietCode revised this gist
Jan 22, 2019 . 2 changed files with 2 additions and 2 deletions.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 @@ -12,5 +12,5 @@ let nodes = document.querySelectorAll(".IssueLabel[title^=\"size\"]"); nodes.forEach(reducer); alert("total size is "+sum+" days ("+(sum*8)+" hours)"); })(); 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:(function()%7B(function()%20%7Blet%20sum%20%3D%200%3Blet%20reducer%20%3D%20function(x)%20%7Blet%20size%20%3D%20x.title%3Blet%20split%20%3D%20size.indexOf('%3A')%20%2B%201%3Bsize%20%3D%20size.substring(split).trim()%3Bsum%20%2B%3D%20Number(size)%3B%7D%3Blet%20nodes%20%3D%20document.querySelectorAll(%22.IssueLabel%5Btitle%5E%3D%5C%22size%5C%22%5D%22)%3Bnodes.forEach(reducer)%3Balert(%22total%20size%20is%20%22%2Bsum%2B%22%20days%20(%22%2B(sum*8)%2B%22%20hours)%22)%3B%7D)()%7D)() -
UnquietCode revised this gist
Jul 9, 2018 . 1 changed file with 2 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 @@ -2,13 +2,14 @@ 1. copy the bookmarklet code below 1. create a new bookmark with the code as the URL 1. navigate to an issues listing view in GitHub, like a milestone view 1. click the bookmark, an alert box will show you the results ## Script Usage 1. navigate to an issues listing view in GitHub, like a milestone view 1. copy the code snippet 1. open the browsers JavaScript developer console on the page 1. paste the code into the console and run it 1. the console output contains the results ## Notes * the issues need a label like `size: 1` or `size : 1` -
UnquietCode revised this gist
Jul 9, 2018 . 1 changed file with 8 additions and 8 deletions.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,14 +1,14 @@ ## Bookmarklet Usage 1. copy the bookmarklet code below 1. create a new bookmark with the code as the URL 1. navigate to an issues listing view in GitHub, like a milestone view 1. click the bookmark an an alert box will show you the results ## Script Usage 1. navigate to an issues listing view in GitHub, like a milestone view 1. copy the code snippet 1. open the browsers JavaScript developer console on the page 1. paste the code into the console and run it ## Notes * the issues need a label like `size: 1` or `size : 1` -
UnquietCode revised this gist
Jul 9, 2018 . 2 changed files with 8 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,4 +1,10 @@ ## Bookmarklet Usage 0. copy the bookmarklet code below 0. create a new bookmark with the code as the URL 0. navigate to an issues listing view in GitHub, like a milestone view 0. click the bookmark an an alert box will show you the results ## Script Usage 0. navigate to an issues listing view in GitHub, like a milestone view 0. copy the code snippet 0. open the browsers JavaScript developer console on the page 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:(function()%7B(function()%20%7B%0A%20%20let%20sum%20%3D%200%3B%0A%0A%20%20let%20reducer%20%3D%20function(x)%20%7B%0A%20%20%20%20let%20size%20%3D%20x.title%3B%0A%20%20%20%20let%20split%20%3D%20size.indexOf(%27%3A%27)%20%2B%201%3B%0A%20%20%20%20size%20%3D%20size.substring(split).trim()%3B%0A%0A%20%20%20%20sum%20%2B%3D%20Number(size)%3B%0A%20%20%7D%3B%0A%0A%20%20let%20nodes%20%3D%20document.querySelectorAll(%22.IssueLabel%5Btitle%5E%3D%5C%22size%5C%22%5D%22)%3B%0A%20%20nodes.forEach(reducer)%3B%0A%0A%20%20alert(%22total%20size%20is%20%22%2Bsum)%3B%0A%7D)()%3B%7D)() -
UnquietCode revised this gist
Jul 9, 2018 . 1 changed file with 7 additions and 0 deletions.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,3 +1,10 @@ ## Usage 0. navigate to an issues listing view in GitHub, like a milestone view 0. copy the code snippet 0. open the browsers JavaScript developer console on the page 0. paste the code into the console and run it ## Notes * the issues need a label like `size: 1` or `size : 1` * sums everything it sees on the page * executes in a closure so it can be re-run if needed -
UnquietCode revised this gist
Jul 9, 2018 . 1 changed file with 3 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,3 +1,5 @@ * the issues need a label like `size: 1` or `size : 1` * sums everything it sees on the page * executes in a closure so it can be re-run if needed * will break if GitHub styles ever change significantly * looks for nodes with the `IssueLabel` class and `title` attribute -
UnquietCode revised this gist
Jul 9, 2018 . 2 changed files with 16 additions and 12 deletions.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,3 @@ * the issues need a label like `size: 1` or `size : 1` * sums everything it sees on the page * executes in a closure so it can be rerun if needed 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,14 +1,16 @@ (function() { let sum = 0; let reducer = function(x) { let size = x.title; let split = size.indexOf(':') + 1; size = size.substring(split).trim(); sum += Number(size); }; let nodes = document.querySelectorAll(".IssueLabel[title^=\"size\"]"); nodes.forEach(reducer); console.log("total size is", sum); })(); -
UnquietCode revised this gist
Jul 9, 2018 . 1 changed file with 3 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 @@ -9,4 +9,6 @@ let reducer = function(x) { }; let nodes = document.querySelectorAll(".IssueLabel[title^=\"size\"]"); nodes.forEach(reducer); console.log("total size is", sum); -
UnquietCode created this gist
Jul 9, 2018 .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 @@ * the issues need a label like `size: 1` or `size : 1` 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,12 @@ let sum = 0; let reducer = function(x) { let size = x.title; let split = size.indexOf(':') + 1; size = size.substring(split).trim(); sum += Number(size); }; let nodes = document.querySelectorAll(".IssueLabel[title^=\"size\"]"); nodes.forEach(reducer);