lib/assets/badge.js
function search (){
    var replaced = 0
    var scripts = document.querySelectorAll('script')
    var script
    for (var i = 0; i < scripts.length; i++) {
      script = scripts[i]
      if (!script.src) continue
      if (/\/slackin\.js(\?.*)?$/.test(script.src)) {
        // replace script with iframe
        replace(script)

        // we abort the search for subsequent
        // slackin.js executions to exhaust
        // the queue
        return true
      }
    }
  }
function search (){
    var replaced = 0
    var scripts = document.querySelectorAll('script')
    var script
    for (var i = 0; i < scripts.length; i++) {
      script = scripts[i]
      if (!script.src) continue
      if (/\/slackin\.js(\?.*)?$/.test(script.src)) {
        // replace script with iframe
        replace(script)

        // we abort the search for subsequent
        // slackin.js executions to exhaust
        // the queue
        return true
      }
    }
  }
function search ( ) { var replaced = 0 var scripts = document . querySelectorAll ( 'script' ) var script for ( var i = 0 ; i < scripts . length ; i ++ ) { script = scripts [ i ] if ( ! script . src ) continue if ( / \/slackin\.js(\?.*)?$ / . test ( script . src ) ) { // replace script with iframe replace ( script ) // we abort the search for subsequent // slackin.js executions to exhaust // the queue return true } } }
search for a script tag pointing to slackin.js
search for a script tag pointing to slackin . js