Codeforces Problem Statement Jumper

Automatic jump the problem statement from problemset to contest

Bu betiği kurabilmeniz için Tampermonkey, Greasemonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Violentmonkey gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

Bu betiği kurabilmeniz için Tampermonkey ya da Userscripts gibi bir kullanıcı betiği eklentisini kurmanız gerekmektedir.

You will need to install an extension such as Tampermonkey to install this script.

Bu komut dosyasını yüklemek için bir kullanıcı komut dosyası yöneticisi uzantısı yüklemeniz gerekecek.

(Zaten bir kullanıcı komut dosyası yöneticim var, kurmama izin verin!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Zateb bir user-style yöneticim var, yükleyeyim!)

// ==UserScript==
// @name               Codeforces Problem Statement Jumper
// @name:zh-CN         Codeforces题面自动跳转
// @description        Automatic jump the problem statement from problemset to contest
// @description:zh-CN  将Codeforces Problemset下的题目页面跳转至该Contest下的题目页面
// @namespace          https://github.com/ScrapW/Codeforces-Problem-Statement-Jumper
// @icon               https://github.com/ScrapW/Codeforces-Problem-Statement-Jumper/raw/master/icon.ico
// @version            1.1
// @author             ScrapW
// @create             2019-05-17
// @match              https://codeforces.com/problemset/problem/*
// @match              http://codeforces.com/problemset/problem/*
// @match              https://codeforc.es/problemset/problem/*
// @match              http://codeforc.es/problemset/problem/*
// @run-at document-start
// ==/UserScript==

var protocol = window.location.protocol
var host = window.location.host
var path = window.location.pathname
path=path.substr(path.lastIndexOf("problem/")+8)
var contest = path.substr(0,path.search('/'))
var no = path.substr(path.search('/')+1)

var tar=protocol+"//"+host+"/contest/"+contest+"/problem/"+no

window.location.replace(tar)