├── README.md └── Zoom-Alert.sketchplugin └── Contents └── Sketch ├── Manifest.json └── Zoom-Alert.js /README.md: -------------------------------------------------------------------------------- 1 | # Zoom Alert 2 | Sketch.app plugin for showing a small notification near the bottom of the UI window, with the current document’s zoom percent. Useful when the toolbar is set to **Icon Only**, as it’s impossible to view the zoom level without **Icon and Text** or **Text Only** enabled. 3 | 4 | ## Installation 5 | 1. Download and open `Zoom-Alert-master.zip` 6 | 2. Locate and double-click `Zoom-Alert.sketchplugin` 7 | 3. That’s it... 8 | 9 | ## How to Use 10 | Select `Plugins ▸ Zoom Alert` in the Sketch menu bar or use the keyboard shortcut to show the document’s current zoom percent. The zoom alert will fade out after one second. 11 | 12 | **Keyboard Shortcut** 13 | `Control` + `z` 14 | 15 | ## Release Notes 16 | **Zoom Alert 2.0** 17 | – Rewrote the plugin using the new bundle format 18 | – Compatible with Sketch versions 39+ 19 | 20 | ## Feedback 21 | If you discover any issues or have questions regarding usage, please send a message to [code@nath.co](mailto:code@nath.co) or find me on GitHub [@nathco](https://github.com/nathco). -------------------------------------------------------------------------------- /Zoom-Alert.sketchplugin/Contents/Sketch/Manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name" : "Zoom Alert", 3 | "identifier" : "com.sketchapp.plugin.Zoom-Alert", 4 | "version" : "2.0", 5 | "description" : "Show a small notification with the document zoom percent.", 6 | "authorEmail" : "code@nath.co", 7 | "author" : "Nathan Rutzky", 8 | "commands" : [{ 9 | "script" : "Zoom-Alert.js", 10 | "handler" : "onRun", 11 | "shortcut" : "control z", 12 | "name" : "Zoom Alert", 13 | "identifier" : "Zoom-Alert" 14 | }] 15 | } 16 | -------------------------------------------------------------------------------- /Zoom-Alert.sketchplugin/Contents/Sketch/Zoom-Alert.js: -------------------------------------------------------------------------------- 1 | // Plugin: Zoom Alert 2 | // Source: github.com/nathco/Zoom-Alert 3 | // Author: Nathan Rutzky 4 | // Update: 2.0 5 | 6 | function onRun(context) { 7 | 8 | var doc = context.document 9 | var val = doc.zoomValue() 10 | var pct = Math.round(val * 100) / 100 11 | 12 | doc.displayMessage_timeout(pct * 100 + '%', 0.7); 13 | }; 14 | --------------------------------------------------------------------------------