Skip to content

Instantly share code, notes, and snippets.

@Beyarz
Last active April 23, 2022 12:07
Show Gist options
  • Select an option

  • Save Beyarz/6f1f4593b2e4a17eba53c68d8d633d0d to your computer and use it in GitHub Desktop.

Select an option

Save Beyarz/6f1f4593b2e4a17eba53c68d8d633d0d to your computer and use it in GitHub Desktop.
devurls.com filter by day
// ==UserScript==
// @name Filter
// @version 1.0
// @description Filter by day
// @author You
// @match https://devurls.com
// @icon https://www.google.com/s2/favicons?sz=64&domain=devurls.com
// @grant none
// ==/UserScript==
(function () {
'use strict'
document.querySelectorAll('[data-view="day"]').forEach(el => {
el.click()
setTimeout(() => {
if (el.parentElement.parentElement.firstChild.title == "no articles") {
console.log(el, " has no articles, removing")
el.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.remove()
}
}, 2500)
})
})()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment