<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Javascript on myByways</title><link>https://myByways.com/tags/javascript/</link><description>Recent content in Javascript on myByways</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 14 Dec 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://myByways.com/tags/javascript/index.xml" rel="self" type="application/rss+xml"/><item><title>Lock Screen "Launcher" Widget with Scriptable</title><link>https://myByways.com/post/lock-screen-launcher-widget-with-scriptable/</link><pubDate>Fri, 02 Dec 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/lock-screen-launcher-widget-with-scriptable/</guid><description>&lt;p&gt;iOS 16 introduced new &lt;strong&gt;lock screen widgets&lt;/strong&gt;! Rather that installing various third party widdgets, I want to create my own using &lt;a href="https://scriptable.app/" rel="external"&gt;Scriptable&lt;/a&gt;. Here is a simple “universal” widget to launch an application or a &lt;strong&gt;Shortcut&lt;/strong&gt; (bonus: or even the home screen too!)&lt;/p&gt;</description></item><item><title>Remove address bar in Firefox child windows</title><link>https://myByways.com/post/remove-address-bar-in-firefox-windows/</link><pubDate>Fri, 21 Jan 2022 00:00:00 +0000</pubDate><guid>https://myByways.com/post/remove-address-bar-in-firefox-windows/</guid><description>&lt;p&gt;I use JavaScript bookmarklets in &lt;a href="https://www.mozilla.org/en-US/firefox/new/" rel="external"&gt;Mozilla Firefox&lt;/a&gt; to open my email, calendar, chat, etc. in pop-up child windows without a toolbar or menu bar. I do this in order to save screen real-estate, and to prevent me from using those windows for browsing and keep them visible all the time. I’ve been wondering how to have pop-up windows without the address bar&amp;hellip;.&lt;/p&gt;</description></item><item><title>A few of my bookmarklets</title><link>https://myByways.com/post/a-few-of-my-bookmarklets/</link><pubDate>Sun, 18 Apr 2021 00:00:00 +0000</pubDate><guid>https://myByways.com/post/a-few-of-my-bookmarklets/</guid><description>&lt;p&gt;I have a few Javascript &lt;strong&gt;bookmarklets&lt;/strong&gt; that I thought I’d share. &lt;a href="https://support.mozilla.org/en-US/kb/bookmarklets-perform-common-web-page-tasks" rel="external"&gt;Bookmarklets&lt;/a&gt; are short snippets of JavaScript code that run in the context of the current web page in the browser. I prefer them over extensions since I can see what the code does. There are plenty on the web, here are a few of mine.&lt;/p&gt;</description></item><item><title>Hide Firefox Toolbar and Tabs in Fullscreen</title><link>https://myByways.com/post/hide-firefox-toolbar-and-tabs-in-fullscreen/</link><pubDate>Thu, 15 Oct 2020 00:00:00 +0000</pubDate><guid>https://myByways.com/post/hide-firefox-toolbar-and-tabs-in-fullscreen/</guid><description>&lt;p&gt;I use macOS spaces (virtual desktops) to arrange the various apps I frequently use. I have one space setup with two Firefox windows, in &lt;strong&gt;fullscreen Split View&lt;/strong&gt; mode. But by default, Firefox windows are not really “full screen” for me, in that the tabs, toolbar and bookmarks bar will still be displayed. Here is my workaround to force the browser to full screen.&lt;/p&gt;</description></item><item><title>Single Page Bulma template with Smooth Scroll and Scroll Spy JavaScript</title><link>https://myByways.com/post/single-page-bulma-template-with-smooth-scroll-and-scroll-spy-javascript/</link><pubDate>Wed, 30 Oct 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/single-page-bulma-template-with-smooth-scroll-and-scroll-spy-javascript/</guid><description>&lt;p&gt;I was building a single page website using &lt;a href="https://bulma.io" rel="external"&gt;Bulma&lt;/a&gt;, and I wanted to achieve effects similar to what I was familiar with using &lt;a href="https://startbootstrap.com/themes/creative" rel="external"&gt;Bootstrap’s Creative one page theme&lt;/a&gt;. As you know, Bulma (mostly) does not provide any &lt;strong&gt;JavaScript&lt;/strong&gt; code, so I had to code the &lt;strong&gt;Smooth Scrolling&lt;/strong&gt; and &lt;strong&gt;Scroll Spy&lt;/strong&gt; features I missed. I intentionally avoided &lt;a href="https://jquery.com/" rel="external"&gt;jQuery&lt;/a&gt;! So I present my solution using plain-old JavaScript.&lt;/p&gt;</description></item><item><title>Forcing Dark Mode with prefs-color-scheme Media Query</title><link>https://myByways.com/post/forcing-dark-mode-with-prefs-color-scheme-media-query/</link><pubDate>Sun, 11 Aug 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/forcing-dark-mode-with-prefs-color-scheme-media-query/</guid><description>&lt;p&gt;A few posts ago, I described how to set &lt;a href="https://myByways.com/post/dark-mode-with-prefers-color-sheme-media-query"&gt;Dark Mode with the &lt;code&gt;prefs-color-scheme&lt;/code&gt; Media Query&lt;/a&gt;. The browser will detect the OS Dark Mode setting (set in the &lt;strong&gt;Windows Control Panel&lt;/strong&gt; or &lt;strong&gt;macOS System Preferences&lt;/strong&gt;) and use the appropriate CSS Media Query rule. But what if you want to programmatically set either Dark or Light mode irrespective of the OS setting?&lt;/p&gt;</description></item><item><title>Dark Mode with prefers-color-sheme Media Query</title><link>https://myByways.com/post/dark-mode-with-prefers-color-sheme-media-query/</link><pubDate>Wed, 03 Jul 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/dark-mode-with-prefers-color-sheme-media-query/</guid><description>&lt;p&gt;&lt;strong&gt;Dark Mode&lt;/strong&gt; is all the rage with desktop and mobile OS’es right now. Interestingly, modern browsers can detect the OS dark mode preference, and use a different set of CSS styles respectively for light or dark modes! Here’s how I updated &lt;a href="https://myByways.com/post/my-custom-grav-theme"&gt;My custom Grav theme&lt;/a&gt;.&lt;/p&gt;</description></item><item><title>My custom Grav theme</title><link>https://myByways.com/post/my-custom-grav-theme/</link><pubDate>Mon, 20 May 2019 00:00:00 +0000</pubDate><guid>https://myByways.com/post/my-custom-grav-theme/</guid><description>&lt;p&gt;I re-designed my blog template using a new CSS framework called &lt;strong&gt;Bluma&lt;/strong&gt;, re-developed all &lt;strong&gt;JavaScript&lt;/strong&gt; without &lt;strong&gt;jQuery&lt;/strong&gt; and customized some plugins. This was quite a journey, so this post is going to be quite long too!&lt;/p&gt;</description></item><item><title>Chart.js - it's easy!</title><link>https://myByways.com/post/chart-js-its-easy/</link><pubDate>Sun, 20 May 2018 00:00:00 +0000</pubDate><guid>https://myByways.com/post/chart-js-its-easy/</guid><description>&lt;p&gt;In &lt;a href="https://myByways.com/post/crunch-png-optimization"&gt;my post yesterday&lt;/a&gt;, I inserted a chart using &lt;a href="http://www.chartjs.org/" rel="external"&gt;Chart.js&lt;/a&gt;. I didn&amp;rsquo;t plan to, but after 5 minutes reading the documentation, I was convinced to try - and it turned out to be easy! Here&amp;rsquo;s how it&amp;rsquo;s done.&lt;/p&gt;</description></item><item><title>Convert SVG to PNG using your browser</title><link>https://myByways.com/post/convert-svg-to-png-using-your-browser/</link><pubDate>Sat, 23 Sep 2017 00:00:00 +0000</pubDate><guid>https://myByways.com/post/convert-svg-to-png-using-your-browser/</guid><description>&lt;p&gt;Lots of web pages now rely on &lt;strong&gt;SVG&lt;/strong&gt; instead of &lt;strong&gt;PNG&lt;/strong&gt; or &lt;strong&gt;JPG&lt;/strong&gt; images. SVG stands for &lt;a href="https://en.wikipedia.org/wiki/SVG" rel="external"&gt;Scalable Vector Graphics&lt;/a&gt;, an XML-based vector image format that scales well, unlike bitmap images (bitmaps become pixelated when up-sized). I recently wanted a quick way to convert a SVG to PNG, and discovered modern browsers (read: &lt;strong&gt;Chrome&lt;/strong&gt; and &lt;strong&gt;Firefox&lt;/strong&gt;) can do this with a simple bit of code.&lt;/p&gt;</description></item></channel></rss>