在 StackExchange 網站上將程式碼擴展至全螢幕

懸停時切換程式碼區塊的全螢幕模式

作者
138 Aspen
今日安裝
0
安裝總數
4
評價
0 0 0
版本
0.1.3.1
建立日期
2024-02-15
更新日期
2025-03-29
尺寸
14.7 KB
授權條款
MIT
腳本執行於

This is just script practice. Any improvement would be greatly appreciated.

     


  • Toggle Fullscreen on Hover: When users hover over a code block, a 'Fullscreen' button appears. Clicking this button will expand the code block to fill the entire screen, facilitating easier reading and analysis of the code without distractions from other page content.

  • Clean Exit from Fullscreen: When the user exits fullscreen mode, the code block returns to its original state without any leftover styling or class changes, ensuring the page remains as it was before the script's interaction.