Hamro Csit

12/5/2024, 4:16:52 PM

当前为 2024-12-08 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Hamro Csit
// @namespace   Violentmonkey Scripts
// @match       https://*.hamrocsit.com/*
// @grant       none
// @version     1.0
// @author      Sush
// @description 12/5/2024, 4:16:52 PM
// @license GPL-3.0-or-later
// ==/UserScript==

  /* Enables Premium */
  tucsitnotes.hassubscription=true

  /* Removes junk */
  let styles = `
    #credential_picker_container,
    .messanger_floating,
    .list-account-info,
    .style-switcher,

    .menu-item[style="position:relative;"],

    .docs-overview .row .col-md-3,
    .category-area .col-md-2,
    .course-single .col-md-3:not(.question-bank-sidebar),

    .feature-area,
    .step-area,
    .cta-area {
      display: none !important;
    }
    .row {
      justify-content: center !important;
    }

    .course-single-tab .nav .nav-link,
    .question-bank-sidebar {
      display: block !important;
      color: white !important;
    }
  `
  let styleSheet = document.createElement("style")
  styleSheet.innerHTML = styles
  document.head.appendChild(styleSheet)

  $('.question-bank-sidebar').show()

  /* Enables dark theme */
  toggleTheme(true)

  $('#qnBankAnswersModal').on('click', () => {
    const btn = document.querySelector('.btn-close')
    const clickEvent = new MouseEvent("click", {
      "view": window,

    });
    btn.dispatchEvent(clickEvent)
  })

  /* Removes banner ads */
  const allImg = document.getElementsByTagName('img')
  console.log(allImg)

  for (var img of allImg) {
    if (img.src.includes('.gif?') || img.src.endsWith('.gif')) {
      $(img).parent().hide()
    }
  }