// ==UserScript== // @name 东方财富计算股票周均值 // @namespace http://tampermonkey.net/ // @version 2024-12-12v4 // @description 东方财富计算股票周均值,收盘价和周均值数据excel导出 // @author meteor // @match https://quote.eastmoney.com/* // @icon https://www.google.com/s2/favicons?sz=64&domain=eastmoney.com // @grant none // @license GPLv3 // @downloadURL https://update.greasyfork.icu/scripts/520476/%E4%B8%9C%E6%96%B9%E8%B4%A2%E5%AF%8C%E8%AE%A1%E7%AE%97%E8%82%A1%E7%A5%A8%E5%91%A8%E5%9D%87%E5%80%BC.user.js // @updateURL https://update.greasyfork.icu/scripts/520476/%E4%B8%9C%E6%96%B9%E8%B4%A2%E5%AF%8C%E8%AE%A1%E7%AE%97%E8%82%A1%E7%A5%A8%E5%91%A8%E5%9D%87%E5%80%BC.meta.js // ==/UserScript== (function() { 'use strict'; // Add styles for the floating button and iframe const styleContent = ` #calculateButton { position: fixed; top: 50px; right: 10px; z-index: 10000; background-color: #28a745; color: white; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-size: 16px; } #calculatorIframeOverlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.5); z-index: 9999; display: none; } #calculatorIframe { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 80%; height: 80%; border: none; } `; const styleElement = document.createElement('style'); styleElement.textContent = styleContent; document.head.appendChild(styleElement); // Create the floating button const calculateButton = document.createElement('div'); calculateButton.id = 'calculateButton'; calculateButton.textContent = '计算'; document.body.appendChild(calculateButton); // Create the overlay and iframe elements const overlay = document.createElement('div'); overlay.id = 'calculatorIframeOverlay'; const iframe = document.createElement('iframe'); iframe.id = 'calculatorIframe'; overlay.appendChild(iframe); document.body.appendChild(overlay); // Add listener for button to toggle iframe visibility calculateButton.addEventListener('click', function() { // Handle iframe loading of your HTML content iframe.srcdoc = `
周数 | 均值 |
---|