vocabtracker wide mode

Moves the transcript element to the otherwise unoccupied area to the right of the window

目前為 2023-11-05 提交的版本,檢視 最新版本

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name vocabtracker wide mode
// @namespace vocabtrackermod
// @author iniquitousx
// @description Moves the transcript element to the otherwise unoccupied area to the right of the window
// @match https://*.vocabtracker.com/getPage/Studying/*
// @license MIT
// @version 1.1
// @run-at document-idle
// ==/UserScript==



var intv = setInterval(function() {



var sect = document.querySelector("#root > section");
var col = document.querySelector("#root > section > div");
col.id = "main_col";

if(!(col.childElementCount>3)){
    console.log("no elements");
    return false;

}
console.log("more than 3 child")

var newDiv = document.createElement("div");
newDiv.style.display="flex";
newDiv.style.flexDirection = "column";
newDiv.style.flexGrow = "1";
newDiv.style.backgroundColor = "white";

col.parentNode.appendChild(newDiv);
newDiv.id = "new_col";

var main_col = document.getElementById("main_col");
var new_col = document.getElementById("new_col");

var page_select = document.querySelector("#main_col > div:nth-child(3)");

try {
    new_col.appendChild(page_select);
} catch (error) {
    console.log("error adding page turner to new column")
}

var word_list = document.querySelector("#main_col > div:nth-child(3)");

try {
    new_col.appendChild(word_list);
} catch (error) {
    console.log("error adding word list to new column")
}

var translation = document.querySelector("#new_col > div:nth-child(2) > div:nth-child(2)");
try {
    main_col.appendChild(translation);
} catch (error) {
    console.log("error adding translation dialog to left column")
}

clearInterval(intv);

return true;

}, 300);