Greasy Fork

Greasy Fork is available in English.

Taobao&Tmall good reputation

Taobao&Tmall one click to good reputation all

当前为 2015-12-10 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Taobao&Tmall good reputation
// @name:zh-CN  淘宝&天猫一键好评
// @name:zh-TW  淘寶%天貓一鍵好評
// @description Taobao&Tmall one click to good reputation all
// @description:zh-CN 淘宝&天猫评价页面添加一键好评按钮
// @description:zh-TW 淘寶%天貓評價頁面添加一鍵好評按鈕
// @version     1.2
// @author      JoJunIori
// @namespace   [email protected]
// @grant       unsafeWindow
// @include     http://rate.taobao.com/*
// @include     https://rate.taobao.com/*
// @include     http://ratewrite.tmall.com/*
// @include     https://ratewrite.tmall.com/*
// ==/UserScript==

// 淘宝一键好评
var tbParentElem = document.querySelector('.submitbox');
var tbGoodRate = document.querySelectorAll('.good-rate');
var tbStar = document.querySelectorAll('.ks-simplestar img');
var tbSubmitBtn = document.querySelector('.J_submit_rate');
var tbNewDir = document.createElement('button');
tbNewDir.innerHTML = '一键好评';
tbNewDir.className = 'tb-rate-btn type-primary tb-rate-btn';
tbNewDir.style.marginLeft = '50px';
tbNewDir.onclick = function() {
  for (var i = 0, a; a = tbGoodRate[i++];) {
    a.click();
  }

  tbStar[4].click();
  tbStar[9].click();
  tbStar[14].click();
  tbSubmitBtn.click();
};

if (tbParentElem) {
  tbParentElem.appendChild(tbNewDir);
}

// 天猫一键好评
var tmParentElem = document.querySelector('.compose-btn');
var tmStar = document.querySelectorAll('[data-star-value="5"]');
var tmSubmitBtn = document.querySelector('.compose-btn [type="submit"]');
var tmNewDir = document.createElement('button');
tmNewDir.innerHTML = '一键好评';
tmNewDir.className = 'tb-rate-btn type-primary tb-rate-btn';
tmNewDir.style.background = 'white';
tmNewDir.style.color = '#c40000';
tmNewDir.style.border = 'inset 1px #c40000';
tmNewDir.onclick = function() {
  for (var i = 0, a; a = tbStar[i++];) {
    a.click();
  }

  tbStar[4].click();
  tbStar[9].click();
  tbStar[14].click();
  tbSubmitBtn.click();
};

if (tmParentElem) {
  tmParentElem.appendChild(tmNewDir);
}