3 ms·
Bookmarklets are great in mobile browsers. This is handy if you want to avoid writing an extension for a simple script. I often use a bookmarklet I wrote to re
by kevlened 3y ago
Bookmarklets are great in mobile browsers. This is handy if you want to avoid writing an extension for a simple script.
I often use a bookmarklet I wrote to remove the extra content from online recipes: https://github.com/kevlened/foodmarklet https://github.com/kevlened/foodmarklet
It’s based on https://github.com/poundifdef/plainoldrecipe https://github.com/poundifdef/plainoldrecipe, but it works entirely in the client.
- jtbayly 3y agoAgreed. I have one I use on my iPhone that shows page source. Comes in handy sometimes. javascript:(function()%7Bvar%20a=window.open('about:blank').document;a.write('%3C!DOCTYPE%20html%3E%3Chtml%3E%3Chead%3E%3Ctitle%3ESource%20of%20'+location.href+'%3C/title%3E%3Cmeta%20name=%22viewport%22%20content=%22width=device-width%22%20/%3E%3C/head%3E%3Cbody%3E%3C/body%3E%3C/html%3E');a.close();var%20b=a.body.appendChild(a.createElement('pre'));b.style.overflow='auto';b.style.whiteSpace='pre-wrap';b.appendChild(a.createTextNode(document.documentElement.innerHTML))%7D)();
- lgats 3y agothis is awesome! I've added the page title to the source: javascript:!function(){var e=window.open("","_blank");e.document.write("<!DOCTYPE html><html><head><title>Source of "+location.href+"</title><meta name='viewport' content='width=device-width, initial-scale=1.0'></head><body><pre></pre></body></html>"),e.document.body.querySelector("pre").textContent=document.documentElement.outerHTML,e.document.close()}();
- raspo 3y agoRecipe websites are some of the worst things on the web these days, with autoplaying videos, ads, newsletter box, cookie notice, while the actual recipe is buried down after a bunch of useless preamble... I tested this foodmarklet in a few places and so far it seems to work amazingly. Thank you for sharing!
- bloopernova 3y agoKagi.com, a $10/month search engine, has "lenses" that "focus" your search. One of the lenses is "recipe sites that are high quality and don't have loads of useless crap"
- nfriedly 3y agoI've taken to copy-pasting recipes into a google doc and then cleaning up the formatting if I use it more than once or twice.
- cxr 3y agoIn the spirit of bookmarklets, you can bookmark this instead: <javascript:"%3Chtml contenteditable%3E"> This changes the current page into a blank rich text editor where you can paste the recipe instead, which eliminates the Google Docs dependency.
- notatoad 3y agooh, this is great. i've never thought to even try bookmarklets on mobile.