Greasy Fork

Greasy Fork is available in English.

PTH Edition auto-move

Move the year, label, and catalogue number to the edition fields

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         PTH Edition auto-move
// @version      0.2
// @description  Move the year, label, and catalogue number to the edition fields
// @author       Chameleon
// @include      http*://redacted.ch/upload.php*
// @grant        none
// @namespace http://greasyfork.icu/users/87476
// ==/UserScript==

(function() {
  'use strict';

  var remaster=document.getElementById('remaster');
  remaster.addEventListener('click', moveEdition, false);
})();

function moveEdition(event)
{
  if(event.shiftKey)
  {
    var year=document.getElementById('year');
    document.getElementById('remaster_year').value = year.value;
    year.value='';
    var rLabel=document.getElementById('record_label');
    document.getElementById('remaster_record_label').value = rLabel.value;
    rLabel.value='';
    var cNumber=document.getElementById('catalogue_number');
    document.getElementById('remaster_catalogue_number').value = cNumber.value;
    cNumber.value='';
    
    document.getElementById('remaster_title').focus();
  }
}