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
Show hidden characters
{ | |
// miscellaneous | |
"javascript.updateImportsOnFileMove.enabled": "always", | |
"typescript.updateImportsOnFileMove.enabled": "always", | |
"diffEditor.ignoreTrimWhitespace": false, | |
// window | |
"window.title": "🦙⚡🫡 – ${activeEditorShort}${separator}${rootName} – 🫡⚡🦙", | |
"window.clickThroughInactive": false, |
Go to your filters and add the following to hide (for yourself only), the number of views for a Tweet. See https://www.freecodecamp.org/news/how-to-block-content-from-web-pages-using-ublock-origin/ if you've never used uBlock filters
twitter.com##[id^="id__"] > div.r-1h0z5md.r-18u37iz.css-1dbjc4n > .r-lrvibr.r-bztko3.r-1ny4l3l.r-bt1l66.r-1777fci.r-1loqt21.css-1dbjc4n.css-18t94o4.css-4rbku5 > .r-qvutc0.r-3s2u2q.r-clp7b1.r-o7ynqc.r-bcqeeo.r-rjixqe.r-1h0z5md.r-16dba41.r-a023e6.r-37j5jr.r-6koalj.r-1bwzh9t.r-1awozwy.css-901oao > .r-1udh08x.r-xoduu5.css-1dbjc4n > span
twitter.com##[id^="id__"] > div.r-1h0z5md.r-18u37iz.css-1dbjc4n > .r-lrvibr.r-bztko3.r-1ny4l3l.r-bt1l66.r-1777fci.r-1loqt21.css-1dbjc4n.css-18t94o4.css-4rbku5 > .r-qvutc0.r-3s2u2q.r-clp7b1.r-o7ynqc.r-bcqeeo.r-rjixqe.r-1h0z5md.r-16dba41.r-a023e6.r-37j5jr.r-6koalj.r-1bwzh9t.r-1awozwy.css-901oao > .r-xoduu5.css-1dbjc4n > .r-1hdv0qi.r-lrvibr.r-1plcrui.r-bnwqim.r-dnmrzs.r-1xvli5t.r-yyyyoo.r-4qtqp9
twitter.com##.r-1mf7evn.css-1dbjc4n > .css-1dbjc4n >
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
/** | |
* Hook for drag attaching drag and drop functionality to a DOM element | |
* | |
* @param {object} props | |
* @param {Function} props.onDragOver The handler that runs when the dragover event is fired. | |
* @param {Function} props.onDragExit The handler that runs when the dragexit/dragleave events are fired. | |
* @param {Function} props.onDrop The handler that runs when the drop event is fired. | |
*/ | |
export function useDragAndDrop({ onDragOver, onDragExit, onDrop }) { | |
const [element, setElement] = useState(null); |
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 expect(actual) { | |
function prettyJSON(objectToSerialize) { | |
return JSON.stringify(objectToSerialize, null, '\t') | |
} | |
return { | |
toBe(expected) { | |
if (actual === expected) { | |
console.log('✅ Pass') | |
} else { |
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
// Just having fun creating some polyfills. | |
/** | |
* A polyfill for Object.prototype.entries. | |
* | |
* @returns {[string, any][]} An array of tuples where each tuple is a key/value pair. | |
*/ | |
Object.prototype.entries = Object.prototype.entries || function() { | |
const obj = this; |
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
// Inspired from Sam Thorogood's article, https://dev.to/chromiumdev/beyond-appendchild-better-convenience-methods-for-html-55n4 | |
function createElement(nodeName, props) { | |
const { style = {}, ...propsNoStyle } = props; | |
const element = Object.assign(document.createElement(nodeName), propsNoStyle); | |
for (const key in style) { | |
element.style[key] = style[key]; | |
}; |
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
/** | |
* Simulates a paste event. | |
* | |
* @param pasteOptions Set of options for a simulated paste event. | |
* @param pasteOptions.destinationSelector Selector representing the DOM element that the paste event should be dispatched to. | |
* @param pasteOptions.pastePayload Simulated data that is on the clipboard. | |
* @param pasteOptions.pasteFormat The format of the simulated paste payload. Default value is 'text'. | |
*/ | |
function paste({ destinationSelector, pastePayload, pasteType = 'text' }) { | |
// https://developer.mozilla.org/en-US/docs/Web/API/Element/paste_event |
NewerOlder