Greasy Fork

Greasy Fork is available in English.

淘宝天猫分类加文字描述&一淘快捷搜索

一键跳转到一淘搜索返利

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Greasemonkey 油猴子Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Violentmonkey 暴力猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴Userscripts ,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey 篡改猴,才能安装此脚本。

您需要先安装一款用户脚本管理器扩展后才能安装此脚本。

(我已经安装了用户脚本管理器,让我安装!)

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展,比如 Stylus,才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

您需要先安装一款用户样式管理器扩展后才能安装此样式。

(我已经安装了用户样式管理器,让我安装!)

// ==UserScript==
// @name         淘宝天猫分类加文字描述&一淘快捷搜索
// @namespace    http://tampermonkey.net/
// @version      0.1
// @description  一键跳转到一淘搜索返利
// @author       You
// @match        https://item.taobao.com/*
// @match        https://detail.tmall.com/*
// @grant        GM_addStyle
// @require      http://code.jquery.com/jquery-1.11.0.min.js
// ==/UserScript==

GM_addStyle ( `

        .J_TSaleProp.tb-img.tb-clearfix > li > a {
          width: auto !important;
          background-position-x: left !important;
        }

        .J_TSaleProp.tb-img.tb-clearfix > li > a > span {
          display: inline !important;
          margin-left:40px;
        }
        .J_TSaleProp.tb-img.tb-clearfix > li > a > p {
          display: inline !important;
          margin-left:40px;
        }

        .tm-clear.J_TSaleProp.tb-img > li > a[href='#'] {
          width: auto !important;
          float: none;
          display: block;
          background-position-x: left !important;
          text-align: left;
        }

        .tm-clear.J_TSaleProp.tb-img > li > a > span {
          display: inline !important;
          margin-left:40px;
        }

` );

$(document).ready(function(){

    var str = $('h3.tb-main-title').text();
    var url = 'https://www.etao.com/search.htm?spm=1002.8274268.2698880.6862&nq='+ $.trim(str);
    $('h3.tb-main-title').append("<a href='"+ encodeURI(encodeURI(url)) +"' target='view_window'><img src=https://img.alicdn.com/tps/TB1_hriOVXXXXXYaXXXXXXXXXXX-32-32.ico></a>");


    var str1 = $('.tb-detail-hd h1').text();
    var url1 = 'https://www.etao.com/search.htm?spm=1002.8274268.2698880.6862&nq='+ $.trim(str1);
    $('.tb-detail-hd h1').append("<a href='"+ encodeURI(encodeURI(url1)) +"' target='view_window'><img src=https://img.alicdn.com/tps/TB1_hriOVXXXXXYaXXXXXXXXXXX-32-32.ico></a>");
});