Perplexity Text Size Fix

Forces smaller text in input areas

当前为 2025-02-17 提交的版本,查看 最新版本

  1. // ==UserScript==
  2. // @name Perplexity Text Size Fix
  3. // @namespace http://tampermonkey.net/
  4. // @version 1.0
  5. // @description Forces smaller text in input areas
  6. // @match *://www.perplexity.ai/*
  7. // @grant none
  8. // ==/UserScript==
  9.  
  10. (function() {
  11. 'use strict';
  12.  
  13. // Create and inject a style element
  14. const style = document.createElement('style');
  15. style.textContent = `
  16. .text-3xl, [class*="!text-3xl"],
  17. textarea, .pointer-events-none {
  18. font-size: 16px !important;
  19. }
  20. .whitespace-pre-line {
  21. line-height: 1.2em !important;
  22. }
  23. `;
  24. document.head.appendChild(style);
  25.  
  26. // Simple observer that runs less frequently
  27. const observer = new MutationObserver((mutations) => {
  28. requestAnimationFrame(() => {
  29. const style = document.querySelector('style');
  30. if (!style) {
  31. document.head.appendChild(style);
  32. }
  33. });
  34. });
  35.  
  36. // Start observing with minimal configuration
  37. observer.observe(document.body, {
  38. childList: true,
  39. subtree: true
  40. });
  41. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址