Skip to content

Commit

Permalink
Update v1.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
philiphoney committed Oct 6, 2023
1 parent 616eeb2 commit a18dd94
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 24 deletions.
45 changes: 23 additions & 22 deletions js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ cancelButton.addEventListener("click", (event) => {
function scSave() {
let localStorageshortcut = localStorage["shortcut"];
let sc = JSON.parse(localStorageshortcut);
var scimage = "";

if (save) {
var inputName = document.getElementById("box-input-0").value;
Expand Down Expand Up @@ -438,38 +437,40 @@ document.querySelector("#content-nav").addEventListener("click", () => {
document.getElementById("input-search-bar").style = "border-radius: 10px;";
});

function Searchtechnology(value) {
var output = [];
var c = -1;
var urlRegex =
/((?:(http|https|Http|Https|rtsp|Rtsp):\/\/(?:(?:[a-zA-Z0-9\$\-\_\.\+\!\*\'\(\)\,\;\?\&\=]|(?:\%[a-fA-F0-9]{2})){1,64}(?:\:(?:[a-zA-Z0-9\$\-\_\.\+\!\*\'\(\)\,\;\?\&\=]|(?:\%[a-fA-F0-9]{2})){1,25})?\@)?)?((?:(?:[a-zA-Z0-9][a-zA-Z0-9\-]{0,64}\.)+(?:(?:aero|arpa|asia|a[cdefgilmnoqrstuwxz])|(?:biz|b[abdefghijmnorstvwyz])|(?:cat|com|coop|c[acdfghiklmnoruvxyz])|d[ejkmoz]|(?:edu|e[cegrstu])|f[ijkmor]|(?:gov|g[abdefghilmnpqrstuwy])|h[kmnrtu]|(?:info|int|i[delmnoqrst])|(?:jobs|j[emop])|k[eghimnrwyz]|l[abcikrstuvy]|(?:mil|mobi|museum|m[acdghklmnopqrstuvwxyz])|(?:name|net|n[acefgilopruz])|(?:org|om)|(?:pro|p[aefghklmnrstwy])|qa|r[eouw]|s[abcdeghijklmnortuvyz]|(?:tel|travel|t[cdfghjklmnoprtvwz])|u[agkmsyz]|v[aceginu]|w[fs]|y[etu]|z[amw]))|(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9])\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[1-9]|0)\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[1-9][0-9]|[0-9])))(?:\:\d{1,5})?)(\/(?:(?:[a-zA-Z0-9\;\/\?\:\@\&\=\#\~\-\.\+\!\*\'\(\)\,\_])|(?:\%[a-fA-F0-9]{2}))*)?(?:\b|$)/gi;
value.replace(urlRegex, function (url) {
if (url.indexOf("http") == -1) {
url = "https://" + url;
function Searchtechnology(input) {
const urls = [];

const urlRegex = /((https?:\/\/|www\.)?[\w-]+\.[a-z]{2,}(\S*))/gi;
const matches = input.match(urlRegex);

if (matches) {
for (const match of matches) {
let url = match.replace(/[\)\]\}]+$/, "").trim();

if (!url.startsWith("http://") && !url.startsWith("https://")) {
url = "https://" + url;
}

urls.push(url);
}
c += 1;
output[c] = url;
});
if (output[0] == undefined) {
}

if (urls.length === 0) {
return false;
} else {
return output;
}

return urls;
}
var a = 1

// offline
loopstart(); function loopstart() {setTimeout (time_evend, 0); function time_evend() {
if (window.navigator.onLine == false || a == 0) {
document.getElementById("off").innerHTML = `<div id="wifi-off"><img src="./image/wifi-off.svg" alt=""></br><span>The world is offline</span></div>`
document.getElementById("select").style = "display: none"
document.getElementById("off").style = "display: block"
document.getElementById("wallpaper-image").style = "";
document.getElementById("select").style = "display: none;"
document.getElementById("off").style = "display: block;"
} else {
document.getElementById("off").innerHTML = `<span></span>`
document.getElementById("select").style = "display: flex"
document.getElementById("wallpaper-image").style =
"background-image: url(" + settings("backgroundimage") + ")";
document.getElementById("select").style = "display: flex;"
}
loopstart();
}}
2 changes: 1 addition & 1 deletion js/settings-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ let course = []
let scl = []

let = system = {
"version": "v1.2.5"
"version": "v1.2.6"
}

let startSettings = {
Expand Down
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"manifest_version": 2,
"name": "World Search",
"version": "1.2.5",
"version": "1.2.6",
"description": "World Search is actually structured like the new tab. You can search with five searches or add unlimited shortcuts. Topics",
"icons": {
"16": "icon16.png",
Expand Down

0 comments on commit a18dd94

Please sign in to comment.