title: Add button to trigger script along top bar in google sheets
body: <p>I have written the script below to hid all rows that have a specific box checked. I set a trigger using the clock and every 10 minutes but instead seems to run every time I check a box and it screws up the view every time I check it. I would like to change it to a manual trigger that is a button along the top bar that someone manually clicks. Can anyone help me edit it? </p>
  
  <pre><code>function onEdit(e) {
    var s = SpreadsheetApp.getActive().getSheetByName('2 Week Snapshot');
    s.showRows(1, s.getMaxRows());
  
    s.getRange('C:C')
      .getValues()
      .forEach( function (r, i) {
      if (r[0] == 1) 
        s.hideRows(i + 1);
      });
  }
  </code></pre>