Nvim recognizes the following events. Names are case-insensitive.
BufAdd
Just after creating a new buffer which is
added to the buffer list, or adding a buffer
| /** | |
| * Web proxy detector detector script by OlyB | |
| * Last updated: 2025-08-11 | |
| * Currently supports Securly and GoGuardian detection methods | |
| * Paste into browser console to use :) | |
| * | |
| * Securly detects using various query selectors and element content, | |
| * While GoGuardian primarly uses the page's visible text content as well as script/img source attributes, which it checks against a list of terms. | |
| * When detected, the script will log the matching selectors and/or terms. | |
| */ |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Screen recorder</title> | |
| </head> | |
| <body> | |
| <button id="recording-toggle">Start recording</button> | |
| <script defer> |
| (function() { | |
| let canvas = document.querySelector('canvas'); | |
| // Optional frames per second argument. | |
| let stream = canvas.captureStream(25); | |
| var options = {mimeType: 'video/webm; codecs=vp9'}; | |
| let recorder = new MediaRecorder(stream, options); | |
| let blobs = []; | |
| function download(blob) { | |
| var url = window.URL.createObjectURL(blob); |
| <!-- | |
| This code will translate page contents automatically (without user input) | |
| Settings located at line 9, current script will translate english to estonian | |
| --> | |
| <style>#google_translate_element,.skiptranslate{display:none;}body{top:0!important;}</style> | |
| <div id="google_translate_element"></div> | |
| <script> | |
| function googleTranslateElementInit() { | |
| new google.translate.TranslateElement({pageLanguage: 'en', includedLanguages: 'et', autoDisplay: false}, 'google_translate_element'); | |
| var a = document.querySelector("#google_translate_element select"); |