Ultimate FPS Booster

Boosts the frame rate of websites to 200 FPS and no input delay

  1. // ==UserScript==
  2. // @name Ultimate FPS Booster
  3. // @namespace Violentmonkey Scripts
  4. // @match *://*/*
  5. // @grant none
  6. // @version 1.3
  7. // @author Your Name
  8. // @description Boosts the frame rate of websites to 200 FPS and no input delay
  9. // ==/UserScript==
  10.  
  11. (function() {
  12. 'use strict';
  13.  
  14. // List of CSS properties to modify
  15. const propertiesToModify = [
  16. 'animation-duration',
  17. 'transition-duration'
  18. ];
  19.  
  20. // Boost factor (e.g., 2.0 for a 200% boost)
  21. const boostFactor = 2.0;
  22.  
  23. // Function to modify CSS properties
  24. function modifyCSSProperty(property, value) {
  25. if (value.endsWith('s')) {
  26. const duration = parseFloat(value);
  27. const boostedDuration = duration * boostFactor;
  28. return boostedDuration + 's';
  29. }
  30. return value;
  31. }
  32.  
  33. // Function to modify CSS styles
  34. function modifyCSSStyles(styles) {
  35. for (let i = 0; i < styles.length; i++) {
  36. const style = styles[i];
  37. const property = style.propertyName;
  38. const value = style.value;
  39.  
  40. if (propertiesToModify.includes(property)) {
  41. const boostedValue = modifyCSSProperty(property, value);
  42. style.value = boostedValue;
  43. }
  44. }
  45. }
  46.  
  47. // Observe DOM changes
  48. const observer = new MutationObserver((mutations) => {
  49. mutations.forEach((mutation) => {
  50. if (mutation.type === 'attributes') {
  51. const target = mutation.target;
  52. if (target.nodeType === Node.ELEMENT_NODE) {
  53. const computedStyles = window.getComputedStyle(target);
  54. modifyCSSStyles(computedStyles);
  55. }
  56. }
  57. });
  58. });
  59.  
  60. // Start observing the entire document
  61. observer.observe(document, {
  62. attributes: true,
  63. subtree: true
  64. });
  65. })();