Qingting.fm timezone fix

Fix an issue affecting qingting.fm player on timezones other than UTC+8

您需要先安裝使用者腳本管理器擴展,如 TampermonkeyGreasemonkeyViolentmonkey 之後才能安裝該腳本。

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

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyViolentmonkey 後才能安裝該腳本。

您需要先安裝使用者腳本管理器擴充功能,如 TampermonkeyUserscripts 後才能安裝該腳本。

你需要先安裝一款使用者腳本管理器擴展,比如 Tampermonkey,才能安裝此腳本

您需要先安裝使用者腳本管理器擴充功能後才能安裝該腳本。

(我已經安裝了使用者腳本管理器,讓我安裝!)

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展,比如 Stylus,才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

你需要先安裝一款使用者樣式管理器擴展後才能安裝此樣式

(我已經安裝了使用者樣式管理器,讓我安裝!)

// ==UserScript==
// @name              Qingting.fm timezone fix
// @name:zh-CN        蜻蜓FM电台时区修复
// @version           1.0
// @description       Fix an issue affecting qingting.fm player on timezones other than UTC+8
// @description:zh-CN 修复蜻蜓FM电台播放器无法在东八区以外的时区正常工作的问题
// @author            StarBrilliant
// @license           Public Domain
// @match             *://*.qingting.fm/*
// @grant             none
// @namespace https://greasyfork.org/users/727840
// ==/UserScript==

(function() {
    'use strict';

    Object.defineProperty(Date.prototype, "getFullYear", {"value": function getFullYear() {
        return new Date(this.getTime() + 28800000).getUTCFullYear();
    }});
    Object.defineProperty(Date.prototype, "getYear", {"value": function getYear() {
        return new Date(this.getTime() + 28800000).getUTCYear();
    }});
    Object.defineProperty(Date.prototype, "getMonth", {"value": function getMonth() {
        return new Date(this.getTime() + 28800000).getUTCMonth();
    }});
    Object.defineProperty(Date.prototype, "getDate", {"value": function getDate() {
        return new Date(this.getTime() + 28800000).getUTCDate();
    }});
    Object.defineProperty(Date.prototype, "getDay", {"value": function getDay() {
        return new Date(this.getTime() + 28800000).getUTCDay();
    }});
    Object.defineProperty(Date.prototype, "getHours", {"value": function getHours() {
        return new Date(this.getTime() + 28800000).getUTCHours();
    }});
    Object.defineProperty(Date.prototype, "getMinutes", {"value": function getMinutes() {
        return new Date(this.getTime() + 28800000).getUTCMinutes();
    }});
    Object.defineProperty(Date.prototype, "getTimezoneOffset", {"value": function getTimezoneOffset() {
        return -480;
    }});
})();