Coder Social home page Coder Social logo

beijixiaohu / ojbetter Goto Github PK

View Code? Open in Web Editor NEW
51.0 1.0 5.0 55.95 MB

适用于在线评测系统(Online Judge)的Tampermonkey脚本,增强功能与界面。

Home Page: https://greasyfork.org/zh-CN/users/747162

License: GNU General Public License v3.0

JavaScript 92.23% HTML 6.34% Python 1.43%
codeforces tampermonkey-userscript

ojbetter's Introduction

嗷呜嗷呜!

ojbetter's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ojbetter's Issues

1

为什么我用脚本编译器提交后他会跳转到cf的提交页面,点提交始终没用

> 是之前一直能用,然后突然不能用了吗,还是之前没用过分段,第一次用

          > 是之前一直能用,然后突然不能用了吗,还是之前没用过分段,第一次用

最近没有更改插件配置,一直使用的是谷歌翻译+分段翻译;
今天在查看这个题单https://codeforces.com/contest/1910/problem/A 后,出现了google翻译报错,并且更改分段翻译为普通翻译无反应,更换翻译API无反应,考虑可能是缓存问题重装插件并清除浏览器数据后,使用DeepL+分段翻译无问题;

Originally posted by @shicxin in #11 (comment)
刚刚测试只要使用google翻译就会出现问题,与分段翻译无关,但是电脑具备外网环境,直接使用google翻译网站无问题,使用沉浸式翻译的google翻译服务无问题

Clist经常找不到题目

对于存在rating的题目,Clist通常无法正确显示,通常只会正确显示最近几场比赛的rating

Like buttons

Problem

When add [likes:??] tags in a blog in Codeforces, and click "Markdown view", the following code will be shown.

$(function() { const likeFormUtil = {}; likeFormUtil.getCount = function ($count) { return Number($count.attr("data-value")); }; likeFormUtil.setCount = function ($count, value) { $count.attr("data-value", value); $count.text(value); }; likeFormUtil.like = function ($likeForm) { $likeForm.find(".likeState").addClass("liked"); const $likeCount = $likeForm.find(".likeCount"); likeFormUtil.setCount($likeCount, likeFormUtil.getCount($likeCount) + 1); }; likeFormUtil.unLike = function ($likeForm) { if ($likeForm.find(".likeState").hasClass("liked")) { $likeForm.find(".likeState").removeClass("liked"); const $likeCount = $likeForm.find(".likeCount"); likeFormUtil.setCount($likeCount, likeFormUtil.getCount($likeCount) - 1); } }; likeFormUtil.dislike = function ($likeForm) { $likeForm.find(".dislikeState").addClass("disliked"); const $dislikeCount = $likeForm.find(".dislikeCount"); likeFormUtil.setCount($dislikeCount, likeFormUtil.getCount($dislikeCount) + 1); }; likeFormUtil.unDislike = function ($likeForm) { if ($likeForm.find(".dislikeState").hasClass("disliked")) { $likeForm.find(".dislikeState").removeClass("disliked"); const $dislikeCount = $likeForm.find(".dislikeCount"); likeFormUtil.setCount($dislikeCount, likeFormUtil.getCount($dislikeCount) - 1); } }; likeFormUtil.disable = function ($likeForm) { $likeForm.find(".likeActionLink").off("click"); $likeForm.find(".likeActionLink").on("click", function () { return false; }); $likeForm.find(".dislikeActionLink").off("click"); $likeForm.find(".dislikeActionLink").on("click", function () { return false; }); }; likeFormUtil.enable = function ($likeForm) { $likeForm.find(".likeActionLink").off("click"); $likeForm.find(".likeActionLink").on("click", onLike); $likeForm.find(".dislikeActionLink").off("click"); $likeForm.find(".dislikeActionLink").on("click", onDislike); }; likeFormUtil.applyLikeableInformation = function(likeableInformation) { const id = likeableInformation.likeable.id; console.log(id); const $likeForm = $(".likeActionLink\[data-likeableId='" + id + "'\]").closest(".likeForm"); console.log($likeForm); likeFormUtil.setCount($likeForm.find(".likeCount"), likeableInformation.likeCount); likeFormUtil.setCount($likeForm.find(".dislikeCount"), likeableInformation.dislikeCount); if (likeableInformation.liked) { $likeForm.find(".likeState").addClass("liked"); } else { $likeForm.find(".likeState").removeClass("liked"); } if (likeableInformation.disliked) { $likeForm.find(".likeState").addClass("disliked"); } else { $likeForm.find(".likeState").removeClass("disliked"); } } likeFormUtil.applyLikeableInformations = function(likeableInformations) { likeableInformations.forEach((applyLikeableInformation) => { likeFormUtil.applyLikeableInformation(applyLikeableInformation); }); } function onLike() { const $likeActionLink = $(this); const likeableId = $likeActionLink.attr("data-likeableId"); const $likeForm = $likeActionLink.parent(); likeFormUtil.disable($likeForm); $.post("/data/like", { action: "like", likeableId: likeableId }, function (data) { if (data\["success"\] === true) { if (data\["liked"\]) { Codeforces.showMessage('Added to liked'); } else { Codeforces.showMessage('Removed from liked'); } likeFormUtil.applyLikeableInformations(data\["likeableInformations"\]); } else { Codeforces.showMessage(data\["message"\] || "Error"); } likeFormUtil.enable($likeForm); }, "json"); return false; } function onDislike() { const $dislikeActionLink = $(this); const likeableId = $dislikeActionLink.attr("data-likeableId"); const $likeForm = $dislikeActionLink.parent(); likeFormUtil.disable($likeForm); $.post("/data/like", { action: "dislike", likeableId: likeableId }, function (data) { if (data\["success"\] === true) { if (data\["disliked"\]) { Codeforces.showMessage('Added to disliked'); } else { Codeforces.showMessage('Removed from disliked'); } likeFormUtil.applyLikeableInformations(data\["likeableInformations"\]); } else { Codeforces.showMessage(data\["message"\] || "Error"); } likeFormUtil.enable($likeForm); }, "json"); return false; } $(".likeActionLink").click(onLike); $(".dislikeActionLink").click(onDislike); $(".likeCount").add(".dislikeCount").each(function () { const $count = $(this); likeFormUtil.setCount($count, likeFormUtil.getCount($count)); }); }); $(function () { });

(Sometimes the shorter one : $(function () { });)

Fix Suggestion

Do not show those useless codes, but show [likes:??] instead.

翻译崩溃

23/12/15,在使用分段翻译时发现翻译崩溃,切换为普通模式后仍有问题
image
重新安装后问题解决

翻译的时候老是弹出,请问可以关掉么

弹窗内容如下

"是否继续翻译?
即将翻译的内容似乎为代码片段,翻译它可能是无意义的,你确定继续吗?"

请问可以默认自动翻译别一直弹出来么,翻译一段弹一段

UI优化建议

1.提交按钮位置
看题页面的提交模块,我很喜欢,很方便
就我和附近同学的习惯都是在idea中调试好代码+样例测试后,复制代码后提交。
页面中的提交按钮在代码块的下方,需要滚轮滑一下才可以找到,体验不够顺滑。
考虑一些用户可能会用这个代码块来检查一下代码,我希望在代码块顶部(“全屏 固定到底部 固定到右侧”附近)新增一个提交按钮

2.返回按钮位置不统一
“固定到底部 固定到右侧”中的“取消固定”按钮在右下角
“全屏”中的“退出全屏”按钮在右上角
希望可以统一成右下角。
(要是三个按钮都叫做“退出”的话,我个人会更喜欢)

3.返回按钮位置
右下角的按钮位置和边框有些冲突,不大好看,建议适当调高
image

一些扣细节的想法,见谅

AtCoder's Japanese homepage is not compatible with the dark mode

https://atcoder.jp/?lang=ja

After enabling the dark mode, I noticed that certain elements like #header, .m-box_inner, and .m-list-job_inner on the page have white backgrounds that are not properly adjusted. This affects the overall visual experience to some extent.

Btw, I think the .html2md-panel element (MarkDown 视图, Copy, 翻译) should not be displayed on the homepage. Is there a way to hide it?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.