Tested in Chrome 61.0.3163.100
Should be executed from the Issues page within a GitHub project.
Minified with http://chriszarate.github.io/bookmarkleter/
Tested in Chrome 61.0.3163.100
Should be executed from the Issues page within a GitHub project.
Minified with http://chriszarate.github.io/bookmarkleter/
function addDays (date, amount) { | |
var result = new Date(date) | |
result.setDate(date.getDate() + amount) | |
return result | |
} | |
function zeroPad (value) { | |
return String(value).padStart(2, '0') | |
} | |
function format (date) { | |
return date.getFullYear() + '-' + zeroPad(date.getMonth() + 1) + '-' + zeroPad(date.getDate()) | |
} | |
var date = new Date() | |
var interval = format(addDays(date, -7)) + '..' + format(date) | |
location.href = "issues?q=is%3Aissue%20state%3Aclosed%20created%3A" + interval |
javascript:!function(){function%20t(t){return%20String(t).padStart(2,%220%22)}function%20e(e){return%20e.getFullYear()+%22-%22+t(e.getMonth()+1)+%22-%22+t(e.getDate())}var%20n=new%20Date,a=e(function(t,e){var%20n=new%20Date(t);return%20n.setDate(t.getDate()+e),n}(n,-7))+%22..%22+e(n);location.href=%22issues%3Fq=is%253Aissue%2520state%253Aclosed%2520created%253A%22+a}(); |