When calling net.isOnline() (and presumably, net.online) within utility process, the result is always true and does not reflect the actual online state of the host device.
Link to reported issue: electron/electron#48100
When calling net.isOnline() (and presumably, net.online) within utility process, the result is always true and does not reflect the actual online state of the host device.
Link to reported issue: electron/electron#48100
| // Call this function | |
| function addViewportMeta() { | |
| const head = document.head | |
| if (!head.querySelector('meta[name=viewport]')) { | |
| const meta = document.createElement('meta') | |
| meta.setAttribute("name", "viewport") | |
| meta.setAttribute("content", "width=device-width, initial-scale=1") | |
| head.appendChild(meta) | |
| } | |
| } |
| const ELLIPSIS_STRING = String.fromCharCode(8230) | |
| function getPotentialAnchors() { | |
| return document.querySelectorAll(`a[href^="https://t.co/"][role="link"]`) | |
| } | |
| function isCardUi(node) { | |
| return !!node.querySelector(`[data-testid*="card"]`) | |
| } |
| function findParentArticle(node) { | |
| if (node.nodeName === 'ARTICLE') return node | |
| return findParentArticle(node.parentNode) | |
| } | |
| function removeTopics(debug = false) { | |
| let numberRemoved = 0 | |
| const topics = document.querySelectorAll('[aria-label^="Follow Topic"]') | |
| if (topics.length === 0) return |
| const isPangram = test => { | |
| const alphabetSet = new Set('abcdefghijklmnopqrstuvwxyz') | |
| const testSet = new Set(test.replace(/[^a-z]/gi, '').toLowerCase()) | |
| return testSet.size === alphabetSet.size | |
| } | |
| console.log(isPangram("This is NOT a pangram.")) // false | |
| console.log(isPangram("The QUICK brown fox jumps over the LAZY dog.")) // true |
I hereby claim:
To claim this, I am signing this object: