Tinkercad Basic shapes only

Hide all but Basic shapes menu and togle sidepanel with F12.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Tinkercad Basic shapes only
// @namespace    http://tampermonkey.net/
// @version      1.2
// @description  Hide all but Basic shapes menu and togle sidepanel with F12. 
// @match        *://www.tinkercad.com/*
// @grant        GM_addStyle
// @license MIT
// ==/UserScript==

(function() {
    'use strict';

    // Voeg CSS toe direct bij het laden
    GM_addStyle(`
        .selectbox-container,
        .search-btn {
            display: none !important;
        }
    `);

    // Functie om de sidebar in/uit te schakelen
    function toggleSidebar() {
        let sidebarButton = document.getElementById("sidebar-collapse-button");
        if (sidebarButton) {
            sidebarButton.click(); // Simuleer een klik op de knop
        }
    }

    // Luister naar de F12-toets om de sidebar te toggelen
    document.addEventListener("keydown", function(event) {
        if (event.key === "F12") {
            console.log("F12 is ingedrukt");
            event.preventDefault(); // Voorkom standaard F12 gedrag
            toggleSidebar();
        }
    });
})();