I made a small JavaScript macro that helps me copy recipes onto steam-engine.org for mixing.
Setup
1. Create new bookmark named "CopyRecipe". In the URL section, paste the following code
javascript: (function() { function copyToClipboard(text) { var dummy = document.createElement("textarea"); document.body.appendChild(dummy); dummy.value = text; dummy.select(); document.execCommand("copy"); document.body.removeChild(dummy); } var ingredients = document.getElementsByClassName('flavors')[0].children[0].children; var results = []; for(var i=0; i<ingredients.length-2; i++){ c = ingredients[i].children; results.push(c[1].innerText + '|' + c[2].innerText + ' ' + c[3].innerText); } copyToClipboard(results);})();
2. Create new bookmark named "PasteRecipe". In the URL section, paste the following code
javascript: (function() { var ingredients = window.prompt("Paste recipe"); var ingredients = ingredients.split(','); var flavor_nm = document.getElementsByClassName('flavor-nm'); var flavor_percent = document.getElementsByClassName('flavor-percent'); for(var i=1; i<ingredients.length; i++) document.getElementById('ej-addflavor').click(); for(var i=0; i<flavor_nm.length; i++) flavor_nm[i].value = ingredients[i+1].split('|')[1]; for(var i=0; i<flavor_percent.length; i++) flavor_percent[i].value = ingredients[i+1].split('|')[0]; document.getElementsByClassName('flavor-vg')[0].click(); document.getElementsByClassName('flavor-vg')[0].click();})();
Usage
- Goto a recipe on alltheflavors. Click the CopyRecipe bookmark. This will copy the recipe into your clipboard (like you would with Ctrl+C).
- Goto the Steam-Engine e-liquid mixing page and click the PasteRecipe bookmark. In the input box, use Ctrl+v OR right-click paste. This will paste the recipe copied by the CopyRecipe macro and populate the ingredients input boxes. All the individual flavours will be pasted with their percentages.
​
Licence: Apache 2.0
Tested on Chrome
Hope it helps y'all :)
Any benefit of using steam engine over atf?
Nope, it's actually less accurate as it doesn't have density information on flavors.
I see.
So the densities are accurate for all flavors on steam?
Seems like a good point, but I never used the AFT mixer because they require me to log in which I don't like...
Edit 1: One advantage I see is that steam-engine allows you to select if flavor is VG based
Why?
You don't need an account to mix recipes using the calc, you just hit the mix button on a recipe.
Also, you can't create an account on ATF directly, you log in with another account, like Google, Twitter, etc.
You're right. I didn't use the Mix functionality so I had no idea... The mix functionality looks useful. I'll give it a try sometimes. So far, Im more comfortable with steam because I've verified their calculations manually (except for ml => gms ratio they assume), and that worked for me so far.
For the account, I don't like connecting apps to my account because I don't like the clutter of who has information to what form my profile. I prefer keeping separate accounts so that it's harder for other companies to profile me...