#!/bin/bash

osascript <<EOF
tell application "Google Chrome"
   set windowList to every window
   repeat with aWindow in windowList
      set tabList to every tab of aWindow
      repeat with atab in tabList
           if (URL of atab contains "$1") then
               tell atab to reload
           end if
      end repeat
   end repeat
end tell
tell application "Safari"
   set windowList to every window
   repeat with aWindow in windowList
      set tabList to every tab of aWindow
      repeat with atab in tabList
           if (URL of atab contains "$1") then
               tell atab to do javascript "window.location.reload()"
           end if
      end repeat
   end repeat
end tell
EOF