Bring Back Default Search in Notion

Notion hijacks the default Command/Control + F shortcut, making it a pain to search the way you're used to. This script restores the standard browser search function, so you can quickly find text like you would anywhere else.

  1. // ==UserScript==
  2. // @name Bring Back Default Search in Notion
  3. // @namespace http://tampermonkey.net/
  4. // @version 2024-10-15
  5. // @description Notion hijacks the default Command/Control + F shortcut, making it a pain to search the way you're used to. This script restores the standard browser search function, so you can quickly find text like you would anywhere else.
  6. // @author Yelban
  7. // @match *://www.notion.so/*
  8. // @icon https://www.google.com/s2/favicons?sz=64&domain=notion.so
  9. // @license MIT
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15.  
  16. window.addEventListener('keydown', function(event) {
  17. if ((event.metaKey || event.ctrlKey) && event.key.toLowerCase() === 'f') {
  18. // Stop the event from propagating to prevent the site from hijacking it
  19. event.stopImmediatePropagation();
  20. // Ensure the default behavior still happens
  21. // Don't call event.preventDefault()
  22. }
  23. }, true); // Set the third parameter to true for the capture phase
  24.  
  25. })();