Skip to content

Instantly share code, notes, and snippets.

06.3 Input.val() Practice: Instagram

  1. Creat an <input> tag and give it a class on Line 26
  2. Create a click handler for button in JavaScript
  3. select the <input>'s class in the click handler, and then get the value using .val()
  4. store the value in a variable so that you can use it later
  • ex: var input = $(".class").val()
  • You can also use console.log to double check that everything is working properly! console.log(input)
  1. display your input to the screen using .append()
<!DOCTYPE html>
<html>
<head>
<title>Test Centered Bar With Controlled Width</title>
</head>
<body>
<section>
<header>Hello</header>
</section>
<div class="left">
@dzeez
dzeez / media speedup bookmarklet.md
Last active June 12, 2022 18:29
html5 video/media playback speedup bookmarklet source (set to 1.8x; easily changeable)

Browser media playback speedup bookmarklet

Tihs javascript snippet, when used as a bookmarklet, will attempt to speed up playback of all media elements (video, audio) by changing the playbackRate property to 1.8. This rate can easily be modified to suit your preference (if you've already "installed" the bookmarklet, right click it and select edit; look for the 1.8 and change it). The easiest way to "install" it is to drag the link below to your browser's bookmarks bar.

Drag this to your bookmarks bar to create bookmarklet

Actually, this won't work here from a gist. Have to setup GH page. In the meantime, copy the code from the code block below, bookmark this page, then edit the bookmark and paste in the code you copied to replace the destination URL.

[Video++](javascript:void function(){try{document.querySelectorAll("video, audio").forEach(e => e.playbackRate=1.8);console.log("media playbackRate modified, hopefully")}catch(a){console.error("Error changing pl