title: How do you combine two bookmarklets into one to toggle brightness?
body: <p>I'm looking to combine these bookmarklets into one bookmarklet for toggling image brightness by clicking the bookmarklet in the bookmarks bar:</p>
  
  <pre><code>javascript:(function(){!function(e) {e.head.appendChild(e.createElement("style"))
    .innerText = ".img,img{-webkit-filter:brightness(50%)}"}(document)})()
  </code></pre>
  
  <p>and:</p>
  
  <pre><code>javascript:(function(){!function(e) {e.head.appendChild(e.createElement("style"))
    .innerText = ".img,img{-webkit-filter:brightness(100%)}"}(document)})()
  </code></pre>
  
  <p>I tried doing it myself, but I failed since it has been a long time since I used javascript. Any help would be appreciated with either the coding or by pointing me to the right direction.</p>
  
  <p>Thank you!</p>