--g- untuk mengontrol gaya halaman dasar seperti font, warna, dan latar belakang. Variabel-variabel ini beradaptasi dengan baik pada mode terang maupun gelap, sehingga gaya Anda lebih stabil dan mudah dipelihara.Contoh: Ubah warna teks utama
.g-, yang relatif stabil dan kecil kemungkinannya rusak akibat perubahan DOM.Contoh: Sembunyikan bilah sisi kiri
.g-. Nama-nama ini dicadangkan oleh platform, memiliki struktur yang relatif stabil, dan tidak mudah gagal. Untuk nama kelas struktural lainnya, gunakan dengan hati-hati untuk menghindari kegagalan gaya setelah peningkatan produk.Command + Option + Iataufn + F12Ctrl + Shift + Iataufn + F12atauF12Cmd/Ctrl + F) untuk menemukan nama kelas.<script> atau <style>. Anda harus mengonversinya menjadi JavaScript murni. Contoh:I'm using Apidog's "Custom JavaScript" feature, which only allows pure JavaScript (no <script> or <style> tags).
Please convert the following code to pure JavaScript. Here are the requirements:
1. Rewrite the <script> tag to document.createElement('script') dynamic creation method;
2. Inject the <style> content into the newly created style tag and insert the head;
3. Please use standard methods (such as createElement, appendChild) for all DOM operations, and do not use document.write;
4. If the original code uses `window.addEventListener('DOMContentLoaded', ...)` or `window.addEventListener('load', ...)` only to wait for the page before running code, remove the event listener and run the code directly. Apidog executes custom JavaScript after the documentation page has been rendered, so the browser's `load` event may already have passed by that time; code registered inside a `load` listener may not be executed;
5. The final generated JavaScript should be able to run directly in the browser without any explanation.
Original code:
---
(paste your code here)
---
https://xxx.apidog.io/), JS kustom tidak akan dimuat dan dijalankan.load browser mungkin sudah berlalu pada saat itu, kode yang ditempatkan di dalam window.addEventListener('load', ...) mungkin tidak berjalan. Dalam sebagian besar kasus, jalankan kode Anda secara langsung sebagai gantinya:iframe.src dengan layanan AI Anda, misalnya:
