Index and css windows

Hello! There’s possible to open index and css at the same time, i’m getting tired to open them every time the page refreshes. Thanks for help!

1 Like

Hello,
In what environment are you talking about the browser, code editor or something else?

I mean when you are doing the exercices

Sorry, I have no idea I thought you were talking about a code editor or browser

I don’t think so. You can try a user script with Tampermonkey.

UserScript
// ==UserScript==
// @name         New Userscript
// @namespace    http://tampermonkey.net/
// @version      2024-07-01
// @description  Auto click editor tabs
// @author       lasjorg
// @match        https://www.freecodecamp.org/learn/*
// @icon         https://www.google.com/s2/favicons?sz=64&domain=freecodecamp.org
// ==/UserScript==

(function () {
  setTimeout(() => {
    const tabButtons = document.querySelectorAll(
      ".monaco-editor-tabs > button"
    );
    tabButtons?.forEach((btn) => {
      if (btn.getAttribute("aria-expanded") === "false") {
        btn.click();
      }
    });
  }, 5000);
})();

It works but only ones, when I open the preview in a new window…

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.