diff --git a/README.md b/README.md
index 68aa169..26c10fb 100644
--- a/README.md
+++ b/README.md
@@ -25,12 +25,23 @@ To use the CSS switcher, just add the following line anywhere within the body ta
```
+Alternatively, open Developer Console and enter the following code:
+
+```
+var body = document.getElementsByTagName('body')[0];
+script = document.createElement('script');
+script.type= 'text/javascript';script.src= 'https://dohliam.github.io/dropin-minimal-css/switcher.js';
+body.appendChild(script);
+```
+
That's it! You should now be able to cycle through the different frameworks by choosing them from the dropdown at the top of the page.
-### Keyboard shortcut
+### Autoplay & Keyboard shortcut
You can quickly switch between frameworks by pressing the [modifier key or keys on your keyboard](https://github.com/dohliam/xsampa#access-keys) + `s` to focus the switcher dropdown menu, followed by the up and down keys to move up and down the list.
+You can also let the script run through the list of frameworks by hit "Play" button. The button should now be focused and if you press `spacebar` anytime, the code will pause at the current theme. The +/- button makes the auto-play feature goes faster or slower.
+
### Bookmarklet
The bookmarklet is a convenient way to preview how different CSS frameworks would look on any HTML page. Just paste the following code into your address bar to create a CSS switcher for any site:
diff --git a/switcher.js b/switcher.js
index c53b2f6..4289772 100644
--- a/switcher.js
+++ b/switcher.js
@@ -19,10 +19,46 @@ function on_css_load() {
switcher.style.backgroundColor = bgColor;
}
+waittime = 1500
+play = false
+
+async function autoplay() {
+ play = !play
+ if (play) {
+ document.getElementById("autoplay").innerText='Stop';
+ } else {
+ document.getElementById("autoplay").innerText='Play';
+ }
+ currentselection=document.getElementById("switcher_dropdown").selectedIndex;
+ for (currentselection;currentselection setTimeout(resolve, ms));
+}
+
+function faster(){
+ if (waittime > 1000){
+ waittime -= 500;
+ }
+}
+function slower(){
+ waittime += 500;
+}
+
+
function inline_switcher() {
switcher = document.getElementById("switcher");
frameworks_array = frameworks.split(",");
- select_open = '\n \n
\n ';
document.body.prepend(new_div);
@@ -55,4 +96,4 @@ function add_switcher() {
inline_switcher();
css_link.onload = on_css_load;
-}
+}
\ No newline at end of file