BreakingLineCode

Ajoute un retour à la ligne automatique pour la balise code.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

You will need to install an extension such as Tampermonkey to install this script.

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name BreakingLineCode
// @namespace Forum
// @author Isilin
// @date 21/04/2024
// @version 1.0
// @description Ajoute un retour à la ligne automatique pour la balise code.
// @license WTF Public License; http://en.wikipedia.org/wiki/WTF_Public_License
// @include https://www.dreadcast.net/Forum
// @include https://www.dreadcast.net/Forum#
// @include https://www.dreadcast.net/FAQ
// @include https://www.dreadcast.net/FAQ#
// @include https://www.dreadcast.net/Forum/*
// @include https://www.dreadcast.net/FAQ/*
// @include https://www.dreadcast.net/EDC
// @include https://www.dreadcast.net/EDC/*
// @compat Firefox, Chrome
// @grant GM_addStyle
// @run-at document-start
// ==/UserScript==

(function() {
let css = `
  pre {
      white-space: pre-wrap !important;
      white-space: moz-pre-wrap !important;
      white-space: -pre-wrap !important;
      white-space: -o-pre-wrap !important;
      line-height: 22px !important;
  }
`;
if (typeof GM_addStyle !== "undefined") {
  GM_addStyle(css);
} else {
  let styleNode = document.createElement("style");
  styleNode.appendChild(document.createTextNode(css));
  (document.querySelector("head") || document.documentElement).appendChild(styleNode);
}
})();