INNER CODE UNIT · JavaScript
checkIsPreview
Useful-Scripts-Extension/useful-script · popup/index.js:572
function checkIsPreview(script) {
if (
location.hostname === "useful-scripts-extension.github.io" ||
location.hostname === "hoangtran0410.github.io" ||
location.hostname === "127.0.0.1"
) {
trackEvent("CLICK_PREVIEW_" + script.id);
Swal.fire({
icon: "info",
title: t({ vi: "Đây là bản xem trước", en: "This is a preview" }),
text: t({
vi: "Vui lòng tải và cài đặt tiện ích Useful-script để sử dung chức năng này nhé",
en: "Please install Useful-script extension to use these features",
}),
confirmButtonText: t({ vi: "Xem hướng dẫn", en: "View tutorial" }),
cancelButtonText: t({ vi: "Đã hiểu", en: "Ok" }),
showCancelButton: true,
reverseButtons: true,