您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Removes playback limitation and dialog "The time has come to open thy heart/wallet"
当前为
- // ==UserScript==
- // @name Bandcamp: I'm Not A Fan
- // @name:ru Bandcamp: Я не фанат
- // @description Removes playback limitation and dialog "The time has come to open thy heart/wallet"
- // @description:ru Снимает ограничение воспроизведений и убирает диалог "Пришло время открыть свое сердце/кошелек"
- // @namespace bc-inotafan.user.js
- // @version 1.1.0
- // @license MIT
- // @author askornot
- // @icon https://s4.bcbits.com/img/favicon/safari-pinned-tab.svg
- // @match https://*.bandcamp.com/*
- // @homepageURL https://greasyfork.org/ru/scripts/438039-bandcamp-i-m-not-a-fan
- // @supportURL https://greasyfork.org/ru/scripts/438039-bandcamp-i-m-not-a-fan/feedback
- // @grant none
- // @run-at document-end
- // @compatible chrome Violentmonkey 2.13.0
- // @compatible firefox Greasemonkey 4.11
- // @compatible firefox Violentmonkey 2.13.0
- // ==/UserScript==
- (function (source) {
- const script = document.createElement('script');
- script.type = 'text/javascript';
- script.textContent = '(' + source.toString() + ')()';
- const target =
- document.getElementsByTagName('head')[0] ||
- document.body ||
- document.documentElement;
- target.appendChild(script);
- })(function () {
- 'use strict';
- const first = (a) => a[0];
- const uncap = (o) => (o.is_capped = false);
- const protect = (...namespaces) => {
- for (const namespace of namespaces) {
- const names = Object.keys(namespace);
- for (const name of names) {
- const target = namespace[name];
- Object.freeze(target);
- }
- }
- };
- const createPatch = (...args) => {
- const data = first(args);
- if (typeof data === 'object') {
- data.trackinfo.map(uncap);
- data.play_cap_data = {
- streaming_limits_enabled: false,
- streaming_limit: Infinity,
- };
- data.is_purchased = true;
- protect(data);
- }
- };
- if (Player === void 0) return;
- const target = 'init';
- const proto = Player;
- const descriptor = Object.getOwnPropertyDescriptor(proto, target);
- Object.defineProperty(proto, target, {
- ...descriptor,
- value: function () {
- createPatch(...arguments);
- return descriptor.value.apply(this, arguments);
- },
- });
- });