var config = {
    url: {
        //域名
		domainz: function () {
		    return "https://sczfai.com";
		},
        domain: function () {
            return "https://sczfai.com";
        },
		domainapi: function () {
		    return "https://sczfai.com/api";
		},
        selectShop: function () {
            return this.domainapi() + '/Shops/lists';
        },
        calculate: function() {
            return this.domainapi() + '/PriceCalculator/calculate';
        },
        getWeight: function () {
            return this.domainapi() + '/PriceCalculator/getWeight';
        },
        weightskuinfo: function () {
            return this.domainapi() + '/PriceCalculator/weightskuinfo';
        },
        pushItem: function () {
            return this.domainapi() + '/PriceCalculator/pushSkus';
        },
        addSku: function () {
            return this.domainapi() + '/PriceCalculator/addSku';
        },
        skusList: function () {
            return this.domainapi() + '/PriceCalculator/skusList';
        },
        itemList: function () {
            return this.domainapi() + '/PriceCalculator/itemList';
        },
        getLogisticsGroups: function () {
            return this.domainapi() + '/PriceCalculator/getLogisticsGroups';
        },
        getLogisticsMethods: function (groupId) {
            return this.domainapi() + '/PriceCalculator/getLogisticsMethods?group_id=' + groupId;
        },
        //查询商品
        getGoodsInfo: function () {
            return this.domainapi() + '/CollectBox/getGoodsInfo';
        },
        //保存产品
        saveProduct: function () {
            return  this.domainapi()+'/CollectBox/Edit';
        },
		//保存SKU产品
		saveProductsku: function () {
		    return this.domainapi() + '/CollectBox/Editskus';
		},
        saveCollectProduct: function () {
            return this.domainapi() + '/CollectBox/SaveProduct';
        },
        //上传图片
        uploadImage: function () {
            return this.domainapi() + '/CollectBox/UploadImageToOssByUrl';
        },
        //验证是否重复采集
        verifyDuplicate: function () {
            return this.domainapi() + '/CollectBox/VerifyDuplicate';
        },
        //获取url采集数据
        getSourceUrlEntity: function () {
            return this.domain() + '/CollectBox/GetSourceUrlEntity';
        },
        // verifyVersion 接口已废弃：MV3 扩展通过 Chrome Web Store 自动更新，
        // 老的 MV2 时代 CollectChromeAppAutoUpdate.xml 文件后端也下线了（404）。
        //匹配国内订单
        matchDomesticOrder: function () {
            return this.domainapi() + '/OrderMatch/matchDomesticOrder';
        },
        batchMatchDomesticOrder: function () {
            return this.domainapi() + '/OrderMatch/batchMatchDomesticOrder';
        },
    },
    /*支持采集的平台,对象数组类型，方便后期拓展其他平台
    * MatchingURLs:数组类型，可匹配的URL，可多个
    * PlatformId:int类型，平台枚举(预留字段)
    * PlatformName: string类型，平台名称 */
    platformArr: [
        {
            MatchingURLs: [
                "https://www.wish.com/product/",
                "https://www.wish.com",
            ],
            PlatformId: 2,
            PlatformName: "Wish"
        },
        {
            MatchingURLs: [
                "https://*aliexpress.*/item/",
                "http://*aliexpress.*/item/"
            ],
            PlatformId: 3,
            PlatformName: "Aliexpress"
        },
        {
            //这里的配置不要动，否则会被读到其它速卖通站点中去  PlatformId: 3
            MatchingURLs: [
                "https://*aliexpress.ru/item/",
                "http://*aliexpress.ru/item/"
            ],
            PlatformId: 14,
            PlatformName: "AliexpressRus"
        },
        {
            MatchingURLs: [
                "https://*.amazon.*/*dp/",
                "https://*.amazon.*/*gp/"
            ],
            PlatformId: 4,
            PlatformName: "Amazon"
        },
        {
            MatchingURLs: [
                "https://detail.1688.com/offer/",
                "https://dj.1688.com/",
                "https://www.1688.com/mwb/detail.1688.com/offer/",
                "https://*.1688.com/page/offerlist",
            ],
            PlatformId: 5,
            PlatformName: "Alibaba"
        },
        {
            MatchingURLs: [
                "https://*.alibaba.com/product",
                "https://www.alibaba.com/product-detail/",
                "https://*.alibaba.com/p-detail/"
            ],
            PlatformId: 6,
            PlatformName: "AlibabaInternation"
        },
        {
            MatchingURLs: [
                "https://www.joom.com/*/products/",
                "https://www.joom.ru/*/products/"
            ],
            PlatformId: 7,
            PlatformName: "Joom"
        }
        ,
        {
            MatchingURLs: [
                "https://item.taobao.com/item.htm",
                "https://srd.simba.taobao.com/rd",
                "https://click.simba.taobao.com/cc_im",
                "http://click.mz.simba.taobao.com/necpm",
                "https://click.mz.simba.taobao.com/necpm"
            ],
            PlatformId: 11,
            PlatformName: "TaoBao"
        }
        ,
        {
            MatchingURLs: [
                // "https://mobile.pinduoduo.com/goods.html",
                // "http://app.yangkeduo.com/",
                // "https://app.yangkeduo.com/",
                // "https://mobile.yangkeduo.com/",
                // "https://mobie.yangkeduo.com/",
                // "https://panduoduo.yangkeduo.com/",
                // "https://yangkeduo.com/*",
                // "https://pifa.pinduoduo.com/goods/detail/*"

                "http*//*pinduoduo*/*",
                "http*//*yangkeduo*/*"
            ],
            PlatformId: 12,
            PlatformName: "PinDuoDuo"
        },
        {
            MatchingURLs: [
                "https://www.ozon.ru/product",
                "https://ozon.ru/product",
                "https://*.ozon.ru/product",
                "https://www.ozon.kz/product",
                "https://ozon.kz/product",
                "https://*.ozon.kz/product",
                "https://www.ozon.by/product",
                "https://ozon.by/product",
                "https://*.ozon.by/product"
            ],
            PlatformId: 8,
            PlatformName: "Ozon"
        }
        ,
        {
            MatchingURLs: [
                "https://www.lazada.co.id/products/",
                "https://www.lazada.vn/products/",
                "https://www.lazada.sg/products/",
                "https://www.lazada.com.my/products/",
                "https://www.lazada.co.th/products/",
                "https://www.lazada.com.ph/products/"
            ],
            PlatformId: 10,
            PlatformName: "Lazada"
        },
        {
            MatchingURLs: [
                "https://*.ebay.com/itm/",
                "https://*.ebay.com.au/itm/",
                "https://*.ebay.*/itm/",
                "https://*.ebay.*.*/itm/"
            ],
            PlatformId: 13,
            PlatformName: "Ebay"
        },
        {
            MatchingURLs: [
                "https://*.tmall.com/item.htm?*",
                "https://*.tmall.hk/hk/item.htm?*"
            ],
            PlatformId: 15,
            PlatformName: "Tmall"
        },
        {
            MatchingURLs: [
                "https://www.coupang.com/vp/products/*"
            ],
            PlatformId: 16,
            PlatformName: "CouPang"
        },
        {
            MatchingURLs: [
                "https://shopee.*/*",
                "https://*.xiapibuy.com/*"
            ],
            PlatformId: 9,
            PlatformName: "Shopee"
        },
        {
            MatchingURLs: [
                "https://item.jd.com/*",
                "https://item.m.jd.com/product/*",
                "http://item.jd.com/*",
                "http://item.m.jd.com/product/*"
            ],
            PlatformId: 18,
            PlatformName: "JD"
        },
        {
            MatchingURLs: [
                "https://*.walmart.com/ip/*"
            ],
            PlatformId: 19,
            PlatformName: "Walmart"
        },
        {
            MatchingURLs: [
                "https://*.banggood.com/*"
            ],
            PlatformId: 20,
            PlatformName: "Banggood"
        },
        {
            MatchingURLs: [
                "https://www.cdiscount.com/*"
            ],
            PlatformId: 17,
            PlatformName: "Cdiscount"
        },
        {
            MatchingURLs: [
                "https://*.temu.com/*"
            ],
            PlatformId: 21,
            PlatformName: "Temu"
        },
        {
            MatchingURLs: [
                "https://*.yiwugo.com/product/detail/*",
                "https://yiwugo.com/product/detail/*"
            ],
            PlatformId: 23,
            PlatformName: "Yiwugo"
        },
        {
            MatchingURLs: [
                "https://*.vvic.com/item/*",
                "https://vvic.com/item/*"
            ],
            PlatformId: 24,
            PlatformName: "VVic"
        },
        {
            MatchingURLs: [
                "https://*.sooxie.com/detail/*",
            ],
            PlatformId: 25,
            PlatformName: "Sooxie"
        },
         {
            MatchingURLs: [
                "https://*.dhgate.com/product/*",
            ],
            PlatformId: 26,
            PlatformName: "Dunhuang"
        },
        {
            MatchingURLs: [
                "https://*.mercadolibre.com.mx/*",
                "https://*.mercadolibre.*.*/*",
                "https://*.mercadolibre.*/*",
                "https://*.mercadolivre.*/*"
            ],
            PlatformId: 22,
            PlatformName: "Mercadoli"
        },
        {
            MatchingURLs: [
                "https://*.go2.cn/*",
                "http://*.go2.cn/*"
            ],
            PlatformId: 28,
            PlatformName: "TuGou"
        },
         {
            MatchingURLs: [
                "https://*.wsy.com/*",
                "http://*.wsy.com/*"
            ],
            PlatformId: 29,
            PlatformName: "WSY"
        },
         {
            MatchingURLs: [
                "https://*.etsy.com/*",
                "http://*.etsy.com/*"
            ],
            PlatformId: 30,
            PlatformName: "ETSY"
        },
         {
            MatchingURLs: [
                "https://*.onbuy.com/*",
                "http://*.onbuy.com/*"
            ],
            PlatformId: 27,
            PlatformName: "OnBuy"
        },
        {
            MatchingURLs: [
                "https://*.wildberries.ru/*",
                "https://*.wildberries.kg/*",
                "https://*.wb.ru/*"
            ],
            PlatformId: 35,
            PlatformName: "Wildberries"
        },
        {
            MatchingURLs: [
                "https://shop.tiktok.com/*",
                "https://*.tiktok.com/*",
                "https://shop-id.tokopedia.com/*",
                "https://shop-uk.tiktokw.eu/*"
            ],
            PlatformId: 32,
            PlatformName: "Tiktok"
        },
        {
            MatchingURLs: [
                "https://*.gigab2b.com/index.php?route=product/product*"
            ],
            PlatformId: 36,
            PlatformName: "GAIAB2B"
        },
     
        {
            MatchingURLs: [
                "https://*.shein.com/*",
                "https://*shein*",
                "https://*.shein.tw/*",
                "https://*.shein.com.mx/*",
            ],
            PlatformId: 38,
            PlatformName: "Shein"
        },
        {
            MatchingURLs: [
                 "https://www.fruugo.es/*/p-*",
                 "https://www.fruugo.us/*/p-*",
                 "https://www.fruugo.de/*/p-*",
                 "https://www.fruugo.it/*/p-*",
                 "https://www.fruugo.fr/*/p-*",
                 "https://www.fruugo.pt/*/p-*",
                 "https://www.fruugo.jp/*/p-*",
                 "https://www.fruugo.co.uk/*/p-*",
                 "https://www.fruugoaustralia.com/*/p-*",
                 "https://www.fruugochina.com/*/p-*",
                 "https://www.fruugo.ie/*/p-*",
                 "https://www.fruugo.pl/*/p-*",
            ],
            PlatformId: 39,
            PlatformName: "Fruugo"
        },
        {
            MatchingURLs: [
                "https://www.saleyee.cn/item/*",
            ],
            PlatformId: 41,
            PlatformName: "Saleyee"
        },
        {
            MatchingURLs: [
                "https://market.yandex.ru/product*",
                "https://market.yandex.ru/card*"
            ],
            PlatformId: 42,
            PlatformName: "Yandex"
        },
        {
            MatchingURLs: [
                "https://detail.91jf.com/goods/*"
            ],
            PlatformId: 43,
            PlatformName: "JF91"
        },
        {
            MatchingURLs: [
                "https://www.xiaohongshu.com/*"
            ],
            PlatformId: 44,
            PlatformName: "小红书"
        },
       
    ],
	cookieName11: "token",
    cookieName1: "usrid",
    cookieName2: "tk",
    // 兼容 chrome.cookies.get 的调用方式：返回 {value} 或 null。
    // Chrome 147+ 某些设置下 chrome.cookies.get 从 content-script 返回空，
    // 统一走 background 消息（那里带 scripting.executeScript 兜底）。
    getCookie: function (opts, callback) {
        try {
            chrome.runtime.sendMessage({ type: 'getCookie', url: opts.url, name: opts.name }, function (value) {
                if (chrome.runtime.lastError) { callback(null); return; }
                callback(value ? { value: value, name: opts.name } : null);
            });
        } catch (e) { callback(null); }
    },
	// logoBase64:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAGB2lUWHRYTUw6Y29tLmFkb2JlLnhtcAAAAAAAPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgNi4wLWMwMDYgNzkuZGFiYWNiYiwgMjAyMS8wNC8xNC0wMDozOTo0NCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczpzdEV2dD0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlRXZlbnQjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOmRjPSJodHRwOi8vcHVybC5vcmcvZGMvZWxlbWVudHMvMS4xLyIgeG1sbnM6cGhvdG9zaG9wPSJodHRwOi8vbnMuYWRvYmUuY29tL3Bob3Rvc2hvcC8xLjAv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CYUoYMEYASAYysakQJ3t9y3c8xR+sL3lC45MeHbzGNw3ffMdaHzRaBBBhpEAGLJrN9ZtmZwHKAAESiUGmGoRQgABFAiAbR8MYW3SCU72+5Tve9lM/+Kee8iXo5b5riHd6zb38xG/c5i1fPN7m3DI++sLgV1pJMwkwCBAGNU7MG8dnPUVGMnYhJCQjgJgQBWEApIY1UcR6s5Q/Od7rq7/hH/xTP/WOHb/011P8I+dLlVgDsFbgAAAAAElFTkSuQmCC",
    // Use the packaged panda icon for the floating collect toolbar and growl notices.
    logoBase64: (typeof chrome !== 'undefined' && chrome.runtime && chrome.runtime.getURL ? chrome.runtime.getURL('img/icon_32.png') : ""),
};
var platformLinkRule = {
    'lazada.':{
         detail: function (url) {
            if (url.indexOf('/products') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'aliexpress.com': {
        detail: function (url) {
            if (url.indexOf('aliexpress.com/item/') !== -1 || url.indexOf('aliexpress.us/item/') !== -1 || url.indexOf('store/product') !== -1 || url.indexOf('aliexpress.com?spm') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    '1688.com': {
        detail: function (url) {
            if (url.indexOf('1688.com/offer') !== -1 || url.indexOf('1688.com/ci_bb') !== -1 || url.indexOf('1688.com/ci_king') !== -1) {
                return true;
            }
        },
        getType:function(url){
            if (url.indexOf('1688.com/offer') !== -1 || url.indexOf('1688.com/ci_bb') !== -1 || url.indexOf('1688.com/ci_king') !== -1){
                return "detail";
            }
            if(/page\/offerlist/.test(url)){
                return "category"
            }
        }
    },
    'aliexpress.ru': {
        detail: function (url) {
            if (url.indexOf('aliexpress.ru/item/') !== -1 || url.indexOf('aliexpress.ru/store') !== -1 || url.indexOf('aliexpress.ru?spm') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'banggood.com': {
        detail: function (url) {
            if (url.indexOf('banggood.com/') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
     'temu.com': {
        detail: function (url) {
           if (/-g-[0-9]*.html/.test(url) || (url.indexOf('goods.html') !== -1 && url.indexOf('goods_id') !== -1)) {
                return true;
            }
        },
        setUrl:function(url){
            if (url.indexOf("temu.com") === -1) {
                if(url && url[0] != "/")
                    url = "/" + url;
                url = "www.temu.com" + url;
                if (!url.startsWith('http')) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
           return "detail";
        }
    },
    'wish.com':{
         detail: function (url) {
            if (url.indexOf('wish.com/product') !== -1||url.indexOf('wish.com/feed/tabbed_feed_latest/product') !== -1||url.indexOf('wish.com/~/gadgets/camcorders/product/') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'alibaba.com': {
        detail: function (url) {
            if (url.indexOf('www.alibaba.com/product-detail') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'walmart.com':{
        detail: function (url) {
            if (url.indexOf('www.walmart.com/ip') !== -1) {
                return true;
            }
        },
        setUrl:function(url){
            if (url.indexOf("walmart.com") === -1) {
                url = "www.walmart.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
           return "detail";
        }
    },
    'tmall.com': {
        detail: function (url) {
            if (url.indexOf('tmall.com/item.htm') !== -1
                || url.indexOf('item.taobao.com/item.htm') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'tmall.hk': {
        detail: function (url) {
            if (url.indexOf('tmall.com/item.htm') !== -1
                || url.indexOf('item.taobao.com/item.htm') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'taobao.com': {
        detail: function (url) {
            if (url.indexOf('tmall.com/item.htm') !== -1
                || url.indexOf('item.taobao.com/item.htm') !== -1
                || url.indexOf('srd.simba.taobao.com/rd') !== -1
                || url.indexOf('click.simba.taobao.com/cc_im') !== -1
                || url.indexOf('click.mz.simba.taobao.com/necpm') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'joom.com': {
        detail: function (url) {
            if (url.indexOf('/products') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'joom.ru': {
        detail: function (url) {
            if (url.indexOf('/products') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'yiwugo.com':{
        detail: function (url) {
            if (url.indexOf('/product/detail') !== -1) {
                return true;
            }
        }
        ,
         setUrl:function(url){
            if (url.indexOf("yiwugo.com") === -1) {
                url = "www.yiwugo.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
           return "detail";
        }
    },
    'vvic.com':{
        detail: function (url) {
            if (url.indexOf('/item') !== -1) {
                return true;
            }
        }
        ,
         setUrl:function(url){
            if (url.indexOf("vvic.com") === -1) {
                url = "www.vvic.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
           return "detail";
        }
    },
    'sooxie.com':{
        detail: function (url) {
            if (url.indexOf('/detail') !== -1) {
                return true;
            }
        }
        ,
         setUrl:function(url){
            if (url.indexOf("sooxie.com") === -1) {
                url = "www.sooxie.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
           return "detail";
        }
    },
    'dhgate.com':{
        detail: function (url) {
            if (url.indexOf('/product') !== -1) {
                return true;
            }
        }
        ,
         setUrl:function(url){
            if (url.indexOf("dhgate.com") === -1) {
                url = "www.dhgate.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
           return "detail";
        }
    },
    'jd.com':{
         detail:function(url){
              if (url.indexOf('item.jd.com/') !== -1||url.indexOf('item.m.jd.com/product')!==-1) {
                return true;
            }
        },
          getType:function(url){
           return "detail";
        }
    },
    'shopee.':{
        detail:function(url){
              if (url.indexOf('-i.') !== -1||url.indexOf('product/')!==-1) {
                return true;
            }
        },
          getType:function(url){
           return "detail";
        }
    },
    'tw.shopeesz.com':{
        detail:function(url){
              if (url.indexOf('-i.') !== -1||url.indexOf('product/')!==-1) {
                return true;
            }
        },
          getType:function(url){
           return "detail";
        }
    },
    'xiapibuy.com':{
         detail:function(url){
              if (url.indexOf('-i.') !== -1||url.indexOf('product/')!==-1) {
                return true;
            }
        },
          getType:function(url){
           return "detail";
        }
    },
    'mercadolibre': {
        detail: function (url) {
            if ((url.indexOf('&type=product&') !== -1 || url.indexOf('&type=item&') !== -1 || url.indexOf('=item_id:') !== -1 || url.indexOf('-_JM') !== -1)) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
         }
    },
    'mercadolivre': {
        detail: function (url) {
            if ((url.indexOf('&type=product&') !== -1 || url.indexOf('&type=item&') !== -1 || url.indexOf('=item_id:') !== -1 || url.indexOf('-_JM') !== -1)) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
         }
    },
    'go2.cn':{
        detail: function (url) {
            if (url.indexOf('/product/') !== -1) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
         }
    },
    'wsy.com':{
        detail: function (url) {
            if (url.indexOf('/item.htm') !== -1) {
                return true;
            }else{
                return false;
            }
        },
        setUrl:function(url){
            if (url.indexOf("wsy.com") === -1) {
                url = "www.wsy.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
            return "detail";
         }
    },
    'etsy.com':{
        detail: function (url) {
            if (url.indexOf('/listing/') !== -1) {
                return true;
            }else{return false;}
        },
        setUrl:function(url){
            if (url.indexOf("etsy.com") === -1) {
                url = "www.etsy.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
            return "detail";
         }
    },
    'onbuy.com':{
          detail: function (url) {
            if (url.indexOf('/gb/p/') !== -1) {
                return true;
            }else{return false;}
        },
        setUrl:function(url){
            if (url.indexOf("onbuy.com") === -1) {
                url = "www.onbuy.com" + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
            return "detail";
         }
    },
    'amazon.':{
        detail: function (url) {
            if (url.indexOf('/dp/') !== -1||url.indexOf('/gp/product/') !== -1) {
                return true;
            }else{return false;}
        },
        setUrl:function(url){
            if (url.indexOf("amazon.") === -1) {
                url = "www.amazon." + url;
                if (url.indexOf("http") === -1) {
                    url = "https://" + url;
                }
            }
            return url;
        },
        getType:function(url){
            return "detail";
         }
    }, 
    'wildberries.ru': {
        detail: function (url) {
            if (url.indexOf('/catalog') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'wildberries.kg': {
        detail: function (url) {
            if (url.indexOf('/catalog') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'tiktok.com': {
        detail: function (url) {
            if (url.indexOf('/catalog') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'gigab2b.com': {
        detail: function (url) {
            if (url.indexOf('/index.php?route=product/product&product_id') !== -1) {
                return true;
            }
        },
        getType:function(url){
           return "detail";
        }
    },
    'fruugo.': {
        detail: function (url) {
            if (url.indexOf('/p-') !== -1) {
               return true;
            }
        },
        getType:function(url){
           return "detail";
        },
    },
    'fruugoaustralia.': {
        detail: function (url) {
            if (url.indexOf('/p-') !== -1) {
               return true;
           }
        },
        getType:function(url){
            return "detail";
        }
    },
    'fruugochina.': {
        detail: function (url) {
            if (url.indexOf('/p-') !== -1) {
                return true;
            }  
        },
        getType:function(url){
           return "detail";
       }
    },
    'shein.com': {
        detail: function (url) {
            if (url.indexOf('.shein') !== -1) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
        }  
    },
    'shein.tw': {
        detail: function (url) {
            if (url.indexOf('.shein') !== -1) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
        }
    },
    'saleyee.': {
        detail: function (url) {
            if (url.indexOf('/item/') !== -1) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
        },
    },
    '91jf.': {
        detail: function (url) {
            if (url.indexOf('/goods/') !== -1) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
        },
    },
    'yandex.ru': {
        detail: function (url) {
            if (url.indexOf('product-') !== -1) {
                return true;
            }
        },
        getType:function(url){
            return "detail";
        },
    }
}
