淘宝优惠券

从券多多查找淘宝优惠券。脚本非官方出品。

目前為 2017-08-24 提交的版本,檢視 最新版本

  1. // ==UserScript==
  2. // @name 淘宝优惠券
  3. // @namespace https://imewchen.com/
  4. // @version 0.1
  5. // @description 从券多多查找淘宝优惠券。脚本非官方出品。
  6. // @author MewChen
  7. // @include http*://item.taobao.com/*
  8. // @include http*://detail.tmall.com/*
  9. // @require https://cdn.bootcss.com/jquery/2.2.4/jquery.min.js
  10. // @grant none
  11. // ==/UserScript==
  12.  
  13. (function() {
  14. 'use strict';
  15. $(document).ready(function() {
  16. var str_host = window.location.host;
  17. var str_host_name = 'taobao';
  18. var str_goods_name = '';//$(document).attr('title');
  19.  
  20. if(str_host.indexOf('taobao.com')==-1) str_host_name = 'tmall';
  21. if(str_host_name=='taobao'){
  22. str_goods_name = $('.tb-main-title').text();
  23. }else{
  24. str_goods_name = $('meta[name=keywords]').attr('content');
  25. }
  26. str_goods_name=$.trim(str_goods_name);
  27. var btn_quan_taobao = '<a style="display: inline-block;padding: 6px 12px;margin-bottom: 0;font-size: 14px;font-weight: normal;height:26px;line-height:26px;text-align: center;white-space: nowrap;vertical-align: middle;-ms-touch-action: manipulation;touch-action: manipulation;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;background-image: none;border: 1px solid transparent;border-radius:2px;color: #fff;background-color: #DF231C;#FF0036;margin-left:10px" href="http://www.quanduoduo.com/index/result?keywords='+ encodeURI(str_goods_name) +'" target="_blank">获取优惠券</a>';
  28. var btn_quan_tmall = '<div class="tb-action" style="margin-top:0"><a style="display: inline-block;padding: 6px 12px;margin-bottom: 0;font-size: 14px;font-weight: normal;height:26px;line-height:26px;width:156px;text-align: center;white-space: nowrap;vertical-align: middle;-ms-touch-action: manipulation;touch-action: manipulation;cursor: pointer;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;background-image: none;border: 1px solid transparent;border-radius:2px;color: #fff;background-color: #DF231C;#FF0036;" href="http://www.quanduoduo.com/index/result?keywords='+ encodeURI(str_goods_name) +'" target="_blank">获取优惠券</a></div>';
  29. if(str_host_name=='taobao'){
  30. $('.tb-action').append(btn_quan_taobao);
  31. }else{
  32. $('.tb-sku').append(btn_quan_tmall);
  33. }
  34. });
  35. })();

QingJ © 2025

镜像随时可能失效,请加Q群300939539或关注我们的公众号极客氢云获取最新地址