customs

try to take over the world!

目前为 2020-07-18 提交的版本。查看 最新版本

// ==UserScript==
// @resource icon1 http://tampermonkey.net/favicon.ico
// @name         customs
// @namespace    http://tampermonkey.net/
// @version      0.2
// @description  try to take over the world!
// @author       yao
// @match

// @include https://www.buyoyo.com/*
// @grant        none
//@require  http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js
// ==/UserScript==

(function() {
    'use strict';
    // 修改标题
    Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr') ).flatMap(i=>Array.prototype.slice.call(i.getElementsByTagName('a'))).map(i=>i.innerHTML = i.innerHTML+ "(DVD版)")
    // 修改介质
    Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr')).map(i=>Array.prototype.slice.call(i.getElementsByTagName('td'))[6]).filter(i=> typeof i !== 'undefined').map(i=>i.getElementsByTagName('b')[0]).filter(i=> typeof i !== 'undefined').map(i=>i.parentNode.parentNode.children[4].innerHTML="DVD")

    // 修改重量
    Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr')).map(i=>Array.prototype.slice.call(i.getElementsByTagName('td'))[6]).filter(i=> typeof i !== 'undefined').map(i=>i.getElementsByTagName('b')[0]).filter(i=> typeof i !== 'undefined').map(i=>i.parentNode.parentNode.children[5].innerHTML="1.0(DU)")
    // 修改单价
    Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr')).map(i=>Array.prototype.slice.call(i.getElementsByTagName('td'))[6]).filter(i=> typeof i !== 'undefined').map(i=>i.getElementsByTagName('b')[0]).filter(i=> typeof i !== 'undefined').map(i=>i.innerHTML = "HK$13.5")
    // 修改数量
    Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr')).map(i=>Array.prototype.slice.call(i.getElementsByTagName('td'))[6]).filter(i=> typeof i !== 'undefined').map(i=>i.getElementsByTagName('b')[0]).filter(i=> typeof i !== 'undefined').map(i=>i.parentNode.parentNode.children[7].children[0].value=1)
    // 修改总价
    Array.prototype.slice.call(document.getElementsByTagName('table')[41].getElementsByTagName('b'))[1].innerHTML = "HK$" + Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr')).map(i=>Array.prototype.slice.call(i.getElementsByTagName('td'))[6]).filter(i=> typeof i !== 'undefined').map(i=>i.getElementsByTagName('b')[0]).filter(i=> typeof i !== 'undefined').map(i=>i.parentNode.parentNode.children[5]).length * 13.5
    // 修改总重量
    Array.prototype.slice.call(document.getElementsByTagName('table')[41].getElementsByTagName('b'))[0].innerHTML = Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr')).map(i=>Array.prototype.slice.call(i.getElementsByTagName('td'))[6]).filter(i=> typeof i !== 'undefined').map(i=>i.getElementsByTagName('b')[0]).filter(i=> typeof i !== 'undefined').map(i=>i.parentNode.parentNode.children[5]).length
    // 修改总金额
    Array.prototype.slice.call(document.getElementsByTagName('table')[41].getElementsByTagName('b'))[1].innerHTML = "HK$" + Array.prototype.slice.call( document.getElementById('cartForm').parentNode.getElementsByTagName('tr')).map(i=>Array.prototype.slice.call(i.getElementsByTagName('td'))[6]).filter(i=> typeof i !== 'undefined').map(i=>i.getElementsByTagName('b')[0]).filter(i=> typeof i !== 'undefined').map(i=>i.parentNode.parentNode.children[5]).length * 13.5
})();

QingJ © 2025

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