IndieRoyale: Show only owned bundles

I have no idea how IR considers their library useful for their customers. -_- So, here is my attempt to fix it.

目前為 2015-02-19 提交的版本,檢視 最新版本

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name         IndieRoyale: Show only owned bundles
// @namespace    lainverse_indieroyale_show_only_owned_bundles
// @version      0.1
// @description  I have no idea how IR considers their library useful for their customers. -_- So, here is my attempt to fix it.
// @author       lainverse
// @match        http://www.indieroyale.com/collection
// @match        https://www.indieroyale.com/collection
// @grant        none
// ==/UserScript==

var bdy = document.querySelector('.deal');
if (!bdy) return; bdy = bdy.parentNode;

var style = document.createElement('style');
style.type = 'text/css';
style.innerHTML = '.body .deal {margin:0!important;} .body hr {height:12px;border:0;box-shadow:inset 0 12px 12px -12px rgba(0,0,0,0.5)}';
console.log(style);
bdy.insertBefore(style,bdy.querySelector(':first-child'));

bdy.appendChild(document.createElement('hr'));

[].forEach.call(document.querySelectorAll('.deal'),function(i){
    if(i.querySelector('.wantbundle')) bdy.appendChild(i);
    i.classList.remove('dealalt');
});