Greasy Fork

Greasy Fork is available in English.

Inject Ruffle (Flash Player)

自动注入 Ruffle 脚本到网页中,让 Flash 内容可以运行

当前为 2025-04-25 提交的版本,查看 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         Inject Ruffle (Flash Player)
// @namespace    http://tampermonkey.net/
// @version      1.0
// @description  自动注入 Ruffle 脚本到网页中,让 Flash 内容可以运行
// @author       You
// @license      MIT
// @match        *://*/*
// @grant        none
// ==UserScript==
// @name         Yandex 搜索结果双列显示
// @namespace    http://greasyfork.icu/users/your-username
// @description  将 Yandex 搜索结果以双列方式排列,提高可读性与信息密度
// @author       你的名字或昵称
// @match        https://ya.ru/*
// @match        https://yandex.com/search/*
// @match        https://yandex.ru/search/*
// @icon         https://yandex.com/favicon.ico
// @license      MIT
// @grant        none
// ==/UserScript==
(function () {
  'use strict';

  function applyTwoColumnLayout() {
    const resultsContainer = document.querySelector('[data-zone-name="SearchResults"]');

    if (!resultsContainer) return;

    // 设置为网格布局
    resultsContainer.style.display = 'grid';
    resultsContainer.style.gridTemplateColumns = '1fr 1fr';
    resultsContainer.style.gap = '20px';
    resultsContainer.style.alignItems = 'start';

    // 每个搜索项设定统一宽度/样式
    const items = resultsContainer.querySelectorAll('li.serp-item');
    items.forEach((item) => {
      item.style.width = '100%';
      item.style.boxSizing = 'border-box';
    });
  }

  // 初次加载或动态加载内容后执行
  const observer = new MutationObserver(() => {
    applyTwoColumnLayout();
  });

  observer.observe(document.body, {
    childList: true,
    subtree: true,
  });

  // 首次执行
  applyTwoColumnLayout();
})();