您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
快速领取淘宝、天猫优惠券
当前为
// ==UserScript== // @name 小惠妹优惠券 - 快速领取淘宝、天猫优惠券 // @namespace http://www.xiaohuimei.com/ // @version 0.3 // @description 快速领取淘宝、天猫优惠券 // @author Minicocor // @match *://*.taobao.com/item.htm?* // @match *://detail.tmall.com/item.htm?* // @require http://cdn.bootcss.com/jquery/2.2.4/jquery.min.js // @grant none // ==/UserScript== (function() { 'use strict'; $(document).ready(function () { var host = window.location.host; var id = getQueryString("id"); var callurl = host + "?id=" + id; var productNm = ''; var addDom = ''; //debugger; if (host.indexOf('taobao.com') > 0) { productNm = $.trim($('.tb-main-title').text()); addDom = ".tb-action"; } else if (host.indexOf('tmall.com') > 0) { productNm = $.trim($('.tb-detail-hd h1').text()); addDom = ".tb-action"; } var apiurl = "http://localhost:50386/dataapi/SearchQuan?s="+productNm+"&callurl="+encodeURIComponent(callurl); apiurl = "http://localhost:50386/dataapi/SearchQuan"; apiurl = "http://www.xiaohuimei.com/search.html"; //apiurl = "http://localhost:50386/s.html"; apiurl = apiurl + "?s="+ encodeURIComponent(productNm)+"&callurl="+ encodeURIComponent(callurl); var clbl = "获取优惠券"; $(addDom).append(AppendHtml(host,apiurl,clbl)); }); function AppendHtml(host, url, clbl) { var ahlbl = "参加双11活动"; var ahurl = "#"; if (host.indexOf('taobao.com') > 0) { return '<div class="div-inline"><div class="tb-btn-buy" style="padding-top:11px;"><a href="' + url+ '" target="_blank">' + clbl + '</a></div></div> <div class="div-inline"><div class="tb-btn-add" style="padding-top:11px;"><a href="' + ahurl + '" target="_blank">' + ahlbl + '</a></div></div>'; } else if (host.indexOf('tmall.com') > 0) { return '<div class="div-inline"><div class="tb-btn-buy tb-btn-sku" style="padding-top:11px;"><a href="' + url + '" target="_blank">' + clbl + '</a></div></div> <div class="div-inline"><div class="tb-btn-basket tb-btn-sku " style="padding-top:11px;"><a href="' + ahurl + '" target="_blank">' + ahlbl + '</a></div></div>'; } else if (host.indexOf('jd.com') > 0) { return '<a class="btn-special1 btn-lg" href="' + url + '" target="_blank">' + clbl + '</a>'; } } function getQueryString(name) { var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i'); var r = window.location.search.substr(1).match(reg); if (r != null) { return decodeURI(r[2]); } return null; } })();
QingJ © 2025
镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址