Greasy Fork 还支持 简体中文。

Quick Notes Anywhere

Adds a floating notepad on any website to jot down ideas or reminders.

  1. // ==UserScript==
  2. // @name Quick Notes Anywhere
  3. // @namespace https://itzmehuman000.github.io/
  4. // @version 1.0
  5. // @description Adds a floating notepad on any website to jot down ideas or reminders.
  6. // @author DUSTIN
  7. // @license MIT
  8. // @match *://*/*
  9. // @grant none
  10. // ==/UserScript==
  11.  
  12. (function () {
  13. 'use strict';
  14.  
  15. const notesContainer = document.createElement('div');
  16. notesContainer.style.position = 'fixed';
  17. notesContainer.style.bottom = '10px';
  18. notesContainer.style.right = '10px';
  19. notesContainer.style.width = '300px';
  20. notesContainer.style.height = '200px';
  21. notesContainer.style.backgroundColor = '#fefefe';
  22. notesContainer.style.border = '1px solid #ccc';
  23. notesContainer.style.borderRadius = '5px';
  24. notesContainer.style.boxShadow = '0 4px 8px rgba(0, 0, 0, 0.1)';
  25. notesContainer.style.padding = '10px';
  26. notesContainer.style.zIndex = '9999';
  27. notesContainer.style.resize = 'both';
  28. notesContainer.style.overflow = 'auto';
  29.  
  30. const textarea = document.createElement('textarea');
  31. textarea.style.width = '100%';
  32. textarea.style.height = '100%';
  33. textarea.style.border = 'none';
  34. textarea.style.outline = 'none';
  35. textarea.style.resize = 'none';
  36. textarea.style.fontFamily = 'Arial, sans-serif';
  37. textarea.style.fontSize = '14px';
  38. textarea.placeholder = 'Type your notes here...';
  39.  
  40.  
  41. textarea.value = localStorage.getItem('quickNotes') || '';
  42.  
  43.  
  44. textarea.addEventListener('input', () => {
  45. localStorage.setItem('quickNotes', textarea.value);
  46. });
  47.  
  48. notesContainer.appendChild(textarea);
  49. document.body.appendChild(notesContainer);
  50. })();