Check and return all open tabs with the specified URL

@param {string} aUrl
URL to check for

@returns Array of tabs
163795
function getTabsWithURL(aUrl) {
  var tabs = [ ];

  var uri = utils.createURI(aUrl, null, null);

  var wm = Cc["@mozilla.org/appshell/window-mediator;1"].
           getService(Ci.nsIWindowMediator);
  var winEnum = wm.getEnumerator("navigator:browser");

  // Iterate through all windows
  while (winEnum.hasMoreElements()) {
    var window = winEnum.getNext();
 
    // Don't check windows which are about to close or don't have gBrowser set
    if (window.closed || !("gBrowser" in window))
      continue;

    // Iterate through all tabs in the current window
    var browsers = window.gBrowser.browsers;
    for (var i = 0; i < browsers.length; i++) {
      var browser = browsers[i];
      if (browser.currentURI.equals(uri)) {
        tabs.push({
          controller : new mozmill.controller.MozMillController(window),
          index : i
        });
      }
    }
  }

  return tabs;
}
521796
async function getPages(srcDir) {
  config = config || (await asyncConfig());
  /** @type Array<String> */
  const allPaths = await globby([
    path.join(srcDir, '**/*.{md,html}'),
    '!**/_*/**/*.{md,html}',
    '!**/pattern-lab/**/*',
    '!**/_*.{md,html}',
  ]);

  return Promise.all(allPaths.map(getPage)).then(pages => {
    if (config.verbosity > 4) {
      log.dim('All data for Static pages:');
      console.log(pages);
      log.dim('END: All data for Static pages.');
    }
    return pages;
  });
}
550821
function grabUrls (opts) {
  opts.shortcode.forEach(function (shortcode) {
    instagrab.url(shortcode, opts.size, function (err, url) {
      console.log(err || url)
    })
  })
}
229195
def get_tabs(self, request, **kwargs):
        """"""
        if self._tab_group is None:
            self._tab_group = self.tab_group_class(request, **kwargs)
        return self._tab_group
1205999
function (url) {
        !url && (url = E);
        var parsedUrl = _.isString(url) ? Url.parse(url) : url,
            auth = parsedUrl.auth,
            protocol = parsedUrl.protocol,
            port = parsedUrl.port,
            path = parsedUrl.path,
            hash = parsedUrl.hash,
            host = parsedUrl.host,
            query = parsedUrl.query,
            variable = parsedUrl.variable;

        // convert object based query string to array
        // @todo: create a key value parser
        if (query) {
            if (_.isString(query)) {
                query = QueryParam.parse(query);
            }

            if (!_.isArray(query) && _.keys(query).length) {
                query = _.map(_.keys(query), function (key) {
                    return {
                        key: key,
                        value: query[key]
                    };
                });
            }
        }

        // backward compatibility with path variables being storing thins with `id`
        if (_.isArray(variable)) {
            variable = _.map(variable, function (v) {
                _.isObject(v) && (v.key = v.key || v.id); // @todo Remove once path variables are deprecated
                return v;
            });
        }

        // expand string path name
        if (_.isString(path)) {
            path && (path = path.replace(regexes.trimPath, MATCH_1)); // remove leading slash for valid path
            // if path is blank string, we set it to undefined, if '/' then single blank string array
            path = path ? (path === PATH_SEPARATOR ? [E] : path.split(PATH_SEPARATOR)) : undefined;
        }

        // expand host string
        _.isString(host) && (host = host.split(regexes.splitDomain));

        _.assign(this, /** @lends Url.prototype */ {
            /**
             * @type {String}
             */
            auth: auth,

            /**
             * @type {String}
             */
            protocol: protocol,

            /**
             * @type {String}
             */
            port: port || undefined,

            /**
             * @type {Array<String>}
             */
            path: path,

            /**
             * @type {String}
             */
            hash: hash || undefined,

            /**
             * @type {Array<String>}
             */
            host: host,

            /**
             * @type {PropertyList<QueryParam>}
             */
            query: new PropertyList(QueryParam, this, query || []),

            /**
             * @type {VariableList}
             */
            variables: new VariableList(this, variable || [])
        });
    }
757138
function(url) {
        var matches = OpenLayers.Util.isEquivalentUrl(this.url, url);
        if(!matches && this.layerUrls) {
            for(var i=0, len=this.layerUrls.length; i<len; ++i) {
                if(OpenLayers.Util.isEquivalentUrl(this.layerUrls[i], url)) {
                    matches = true;
                    break;
                }
            }
        }
        return matches;
    }
1079779
function getTabData(url){
    var key,
        data;

    key = urlToKey(url);
    obj = tabData[key];
    return (obj)? obj : {data: {}, url: url};
}
1180196
function(){
        var url = window.location.href;
        var vars = {};
        var hashes = url.slice(url.indexOf('#') + 1).split('&');
        for(var i=0; i<hashes.length; i++) {
            var hash = hashes[i].split('=');
            if(hash.length > 1) {
                vars[hash[0]] = hash[1];
            } else {
                vars[hash[0]] = null;
            }
        }
        return vars;
    }
674764
function getEntryURLs(properties, preference = ENTRY_URL_TYPE_ANY) {
    const urlRef = Object.keys(properties)
        .filter(key => URL_PROP.test(key))
        .reduce(
            (output, nextKey) =>
                Object.assign(output, {
                    [nextKey]: properties[nextKey]
                }),
            {}
        );
    if (preference === ENTRY_URL_TYPE_GENERAL || preference === ENTRY_URL_TYPE_LOGIN) {
        return Object.keys(urlRef)
            .sort((a, b) => {
                if (preference === ENTRY_URL_TYPE_GENERAL) {
                    const general = /^ur[li]$/i;
                    const aVal = general.test(a) ? 1 : 0;
                    const bVal = general.test(b) ? 1 : 0;
                    return bVal - aVal;
                } else if (preference === ENTRY_URL_TYPE_LOGIN) {
                    const login = /login/i;
                    const aVal = login.test(a) ? 1 : 0;
                    const bVal = login.test(b) ? 1 : 0;
                    return bVal - aVal;
                }
                return 0;
            })
            .map(key => urlRef[key]);
    } else if (preference === ENTRY_URL_TYPE_ICON) {
        const iconProp = Object.keys(urlRef).find(key => URL_PROP_ICON.test(key));
        return iconProp ? [urlRef[iconProp]] : [];
    }
    // Default is "any" URLs
    return objectValues(urlRef);
}
52020
def check_urls(urls):
    '''
    
    '''
    threads = list()
    progress_bar = None
    progress_counter = 0

    if SHOW_PROGRESS_BAR and len(urls) > 0:

        widgets = [SimpleProgress()]
        progress_bar = ProgressBar(widgets=widgets, maxval=len(urls)).start()

    for u in urls:
        t = Thread(target=async_check_url, args=(u[0], u[1], u[2]))
        t.start()
        threads.append(t)

    for thread in threads:
        if SHOW_PROGRESS_BAR and len(urls) > 0:
            progress_counter = progress_counter + 1
            progress_bar.update(progress_counter)

        thread.join()

    if SHOW_PROGRESS_BAR and len(urls) > 0:
        progress_bar.finish()
453856
function getFullUrl(url, base = location.href) {
    const d = document.implementation.createHTMLDocument('');
    const b = d.createElement('base');
    const a = d.createElement('a');

    d.head.appendChild(b);
    d.body.appendChild(a);
    b.href = base;
    a.href = url;

    return a.href;
}
354753
def query_all():
        '''
        
        '''
        recs = TabPost2Tag.select(
            TabPost2Tag,
            TabTag.kind.alias('tag_kind'),
        ).join(
            TabTag,
            on=(TabPost2Tag.tag_id == TabTag.uid)
        )
        return recs
224172
public static void openInDefaultBrowser(URL url) throws IOException {
        Runtime rt = Runtime.getRuntime();

        if (SystemUtils.IS_OS_WINDOWS) {
            rt.exec("rundll32 url.dll,FileProtocolHandler " + url);
        } else if (SystemUtils.IS_OS_MAC) {
            rt.exec("open" + url);
        } else {
            String[] browsers = {"epiphany", "firefox", "mozilla", "konqueror",
                    "netscape", "opera", "links", "lynx"};

            StringBuilder cmd = new StringBuilder();
            for (int i = 0; i < browsers.length; i++)
                cmd.append(i == 0 ? "" : " || ").append(browsers[i]).append(" \"").append(url).append("\" ");

            rt.exec(new String[]{"sh", "-c", cmd.toString()});
        }
    }
623328
function (surl) {
            var search = (surl || window.location.search).match(/\?.*(?=\b|#)/);
            search && (search = search[0].replace(/^\?/, ''));
            if (!search) return {};
            var queries = {},
                params = search.split('&');

            util.each(params, function (item) {
               var param = item.split('=');
               queries[param[0]] = param[1];
            });

            return queries;
        }
236235
function getScraperResults (SCRAPER, urls, htmls) {
  return Promise.all(
    urls.map((url, i) => {
      const html = htmls[i]
      const name = SCRAPER.name
      const Module = require(name)
      return SCRAPER.scrape(Module, url, html).then(metadata => {
        return SCRAPER.normalize(metadata)
      })
    })
  )
}
844854
private String tabBrowsers() {
    StringBuilder builder = new StringBuilder();
    builder.append("<div type='browsers' class='content_detail'>");

    SlotsLines rcLines = new SlotsLines();
    SlotsLines wdLines = new SlotsLines();

    for (TestSlot slot : proxy.getTestSlots()) {
      if (slot.getProtocol() == SeleniumProtocol.Selenium) {
        rcLines.add(slot);
      } else {
        wdLines.add(slot);
      }
    }

    if (rcLines.getLinesType().size() != 0) {
      builder.append("<p class='protocol' >Remote Control (legacy)</p>");
      builder.append(getLines(rcLines));
    }
    if (wdLines.getLinesType().size() != 0) {
      builder.append("<p class='protocol' >WebDriver</p>");
      builder.append(getLines(wdLines));
    }
    builder.append("</div>");
    return builder.toString();
  }
808886
function (url) {
/*Line 114 - 'AtomUI.js' */        var r = {};

/*Line 116 - 'AtomUI.js' */        var plist = url.split('&');

/*Line 118 - 'AtomUI.js' */        var ae = new AtomEnumerator(plist);
/*Line 119 - 'AtomUI.js' */        while (ae.next()) {
/*Line 120 - 'AtomUI.js' */            var p = ae.current().split('=');
/*Line 121 - 'AtomUI.js' */            var key = p[0];
/*Line 122 - 'AtomUI.js' */            var val = p[1];
/*Line 123 - 'AtomUI.js' */            if (val) {
/*Line 124 - 'AtomUI.js' */                val = decodeURIComponent(val);
/*Line 125 - 'AtomUI.js' */            }
/*Line 126 - 'AtomUI.js' */            val = AtomUI.parseValue(val);
/*Line 127 - 'AtomUI.js' */            r[key] = val;
/*Line 128 - 'AtomUI.js' */        }
/*Line 129 - 'AtomUI.js' */        return r;
/*Line 130 - 'AtomUI.js' */    }