Comments (7)
描述你想要的功能 希望能加设计一个按钮,切换e-hantai和exhentai。
虽然和作为翻译插件的初衷不同,但有这个功能会方便很多。
from ehsyringe.
使用场景是啥?
from ehsyringe.
这个功能不应该集成在EhSyringe中。可以考虑用 userscript 单独写个插件。
说实话我也不是很明白这样做到底有什么作用。
我倒是想到如果因为特定标签表站屏蔽的作品写个插件自动跳转到里站。
from ehsyringe.
// ==UserScript==
// @name 表里站切换按钮
// @namespace com.xioxin.switchsite
// @version 0.1
// @description switch site
// @author xioxin
// @match *://exhentai.org/*
// @match *://e-hentai.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const x = location.host[1] === 'x';
const a = document.createElement('a');
const u = new URL(location.href);
u.host = 'e' + (x ? '-' : 'x') + u.host.slice(2);
a.href = u.href;
a.style.position = 'fixed';
a.style.right = 0;
a.style.top = 0;
a.textContent = (x ? '表' : '里')
document.body.append(a);
})();
from ehsyringe.
这个功能不应该集成在EhSyringe中。可以考虑用 userscript 单独写个插件。 说实话我也不是很明白这样做到底有什么作用。 我倒是想到如果因为特定标签表站屏蔽的作品写个插件自动跳转到里站。
使用场景确实不是很多。
有些人喜欢用里站有些人喜欢用表站(比如把里站做特殊用或者要玩HV和H@H 这些只有表站有入口),如果一个喜欢用表站的人收到了一个里站的链接,加上切换功能可以让使用体验更统一。
from ehsyringe.
// ==UserScript== // @name 表里站切换按钮 // @namespace com.xioxin.switchsite // @version 0.1 // @description switch site // @author xioxin // @match *://exhentai.org/* // @match *://e-hentai.org/* // @grant none // ==/UserScript== (function() { 'use strict'; const x = location.host[1] === 'x'; const a = document.createElement('a'); const u = new URL(location.href); u.host = 'e' + (x ? '-' : 'x') + u.host.slice(2); a.href = u.href; a.style.position = 'fixed'; a.style.right = 0; a.style.top = 0; a.textContent = (x ? '表' : '里') document.body.append(a); })();
谢谢,已经完美解决需求。
另外问一下,怎么把改按键改大一点?
from ehsyringe.
// ==UserScript==
// @name 表里站切换按钮
// @namespace com.xioxin.switchsite
// @version 0.1
// @description switch site
// @author xioxin
// @match *://exhentai.org/*
// @match *://e-hentai.org/*
// @grant none
// ==/UserScript==
(function() {
'use strict';
const x = location.host[1] === 'x';
const a = document.createElement('a');
const u = new URL(location.href);
u.host = 'e' + (x ? '-' : 'x') + u.host.slice(2);
a.href = u.href;
a.style.position = 'fixed';
a.style.right = '4px'; // 右边距离
a.style.top = '4px'; // 上边距离
a.style.fontSize = '24px'; // 字体大小
a.textContent = (x ? '表' : '里')
document.body.append(a);
})();
from ehsyringe.
Related Issues (20)
- 请求上传谷歌商店或者edge商店 HOT 1
- 图库管理页面翻译提交 HOT 2
- 数据库更新停止在了8月20日 HOT 2
- 通过 AdGuard 的脚本管理器使用时,标签没有被翻译 HOT 11
- 可否添加对e站的洋葱站点的翻译支持? HOT 1
- 新版本 Tampermonkey 下偶尔无法正常工作 HOT 1
- 请关注[Hentai@Home]修改 HOT 2
- ![image](https://user-images.githubusercontent.com/65083224/214225235-e9badbd9-96d2-4394-ab96-03b863cf1aa7.png) HOT 3
- 请关注[Hentai@Home]修改 HOT 5
- H@H Miss 应当翻译为缓存未命中
- (订阅->我的标签)标签输入框没有注射 HOT 1
- TAG无法更新数据库
- 有关在浏览器工具栏切换搜索站点 HOT 3
- 请教版本更新中的“更新翻译”的含义 HOT 1
- 表站搜索栏无法显示搜索提示/补全
- Manifest version 2 is deprecated, and support will be removed in 2023 HOT 4
- 延长版新版本已无法添加未通过验证的附加组件? HOT 2
- 求教如何使用 HOT 2
- Submit New Expunge Petition 翻译 HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ehsyringe.