Element.prototype._addEventListener = Element.prototype.addEventListener;
Element.prototype.addEventListener = function(a,b,c) {
if(c==undefined)
c=false;
this._addEventListener(a,b,c);
if(!this.eventListenerList)
this.eventListenerList = {};
if(!this.eventListenerList[a])
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 characters
| function useCachedAbortiveQuery<T>( | |
| query: DocumentNode, | |
| variables: Record<string, unknown>, | |
| deps: Array<any> | |
| ) { | |
| const apolloClient = useApolloClient(); | |
| const [data, setData] = useState<T>(); | |
| const [error, setError] = useState<Error | null>(null); | |
| const [loading, setLoading] = useState<boolean>(true); |
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 characters
| import re | |
| from zipfile import ZipFile, Path | |
| """ | |
| TailwindCSS plugin patcher for IntelliJ IDEA | |
| -------------------------------------------- | |
| 1. Download the latest ZIP of the plugin compatible with your version of IntelliJ here: | |
| https://plugins.jetbrains.com/plugin/15321-tailwind-css/versions | |
| 2. Fill `CLASS_ATTRIBUTES` to specify which XML attributes can contain Tailwind classes. |
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 characters
| const listeners = (function listAllEventListeners() { | |
| let elements = []; | |
| const allElements = document.querySelectorAll('*'); | |
| const types = []; | |
| for (let ev in window) { | |
| if (/^on/.test(ev)) types[types.length] = ev; | |
| } | |
| for (let i = 0; i < allElements.length; i++) { | |
| const currentElement = allElements[i]; |
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 characters
| console.table((function listAllEventListeners() { | |
| const allElements = Array.prototype.slice.call(document.querySelectorAll('*')); | |
| allElements.push(document); // we also want document events | |
| const types = []; | |
| for (let ev in window) { | |
| if (/^on/.test(ev)) types[types.length] = ev; | |
| } | |
| let elements = []; | |
| for (let i = 0; i < allElements.length; i++) { |
OlderNewer