safari/github-gmail.safariextension/main.js
// Trigger the appended link in mail view
Trigger the appended link in mail view
Trigger the appended link in mail view
function triggerGitHubLink (backgroundOrNot) {
  window.idled = false
  var link = getVisible(document.getElementsByClassName('github-link'))
  safari.self.tab.dispatchMessage('new-tab', {url: link.href, active: !backgroundOrNot})
  setTimeout( function (){ window.idled = true }, 100)
}
function triggerGitHubLink ( backgroundOrNot ) { window . idled = false var link = getVisible ( document . getElementsByClassName ( 'github-link' ) ) safari . self . tab . dispatchMessage ( 'new-tab' , { url : link . href , active : ! backgroundOrNot } ) setTimeout ( function ( ) { window . idled = true } , 100 ) }
Trigger the appended link in mail view
Trigger the appended link in mail view
// avoid link being appended multiple times