Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Ubiquity - Checks if a site is down.
name: "site-down",
icon: "",
author: {name: "Pratham Kumar", email: ""},
description: "Checks if a site is down.",
homepage: "",
takes: {"": noun_arb_text},
preview: function (html, q) {
var params = {};
html.innerHTML = 'Checking <b>'+q.text+'</b>';
jQuery.get (''+q.text, params, function (data) {
var regex = new RegExp (".*class.*", "gi");
line = regex.exec (data);
html.innerHTML = line [0];
execute: function (q) {
var url = ""+q.text;
Utils.openUrlInBrowser (url);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.