{"id":15,"date":"2011-05-10T12:00:00","date_gmt":"2011-05-10T12:00:00","guid":{"rendered":"https:\/\/eric.tedjamulia.com\/blog\/facebook-math-bookmarklet\/"},"modified":"2011-05-10T12:00:00","modified_gmt":"2011-05-10T12:00:00","slug":"facebook-math-bookmarklet","status":"publish","type":"post","link":"https:\/\/eric.tedjamulia.com\/blog\/facebook-math-bookmarklet\/","title":{"rendered":"A little math before Facebook"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Shantell wanted her Facebook bookmark to make her solve a math problem before letting her in. That sounded like a perfectly reasonable little programming project. \ud83d\ude42<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I made it as a bookmarklet instead of a browser extension. The bookmark runs a small JavaScript function, asks a randomly generated multiplication or percentage question with <code>prompt()<\/code>, and keeps asking until the answer is right. Then it sends the browser to Facebook.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">There are easier and harder versions, depending on how much arithmetic you want standing between you and the news feed. It is not really blocking Facebook; typing the address still works. It is just a little speed bump attached to the bookmark we actually use. I like projects this size: somebody has a slightly unusual request, and a few lines of JavaScript make it happen.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/etedj.com\/projects\/FacebookBookmarklet.html\">See the bookmarklets<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shantell wanted her Facebook bookmark to make her solve a math problem before letting her in. That sounded like a perfectly reasonable little programming project. \ud83d\ude42 I made it as a bookmarklet instead of a browser extension. The bookmark runs a small JavaScript function, asks a randomly generated multiplication or percentage question with prompt(), and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[14,5,3],"class_list":["post-15","post","type-post","status-publish","format-standard","hentry","category-tools","tag-bookmarklets","tag-family","tag-javascript"],"_links":{"self":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/15","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/comments?post=15"}],"version-history":[{"count":0,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/posts\/15\/revisions"}],"wp:attachment":[{"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/media?parent=15"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/categories?post=15"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/eric.tedjamulia.com\/blog\/wp-json\/wp\/v2\/tags?post=15"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}