Enhanced dindebat.dk

A few small enhancements for dindebat.dk

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

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

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

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

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

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

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

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

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

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

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

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

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

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

// ==UserScript==
// @name        Enhanced dindebat.dk
// @namespace   unstupify.jubii
// @include     http://dindebat.dk/*
// @version     6
// @require  http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js
// @run-at document-end
// @grant    GM_addStyle
// @description A few small enhancements for dindebat.dk
// ==/UserScript==


  //Fjerner den irriterende kæmpe Jubii-bar fra toppen
  document.getElementById('jubii-header').remove();

  //rykker debatten op
  GM_addStyle ("  \
    .jubii-header-fixed-container{  \
       padding-top:10px !important;  \
    } " );

  GM_addStyle ("  \
    .jubii-adunit-container{  \
       display:none !important;  \
    } " );

//Farver and stuff

  //Indlæg baggrund og ramme
  GM_addStyle ("  \
    .ipsAreaBackground_light{  \
       background:#EEEEEE !important;  \
    } " );

  GM_addStyle ("  \
    .ipsBox {  \
       background-color:#EEEEEE !important;  \
       border-color:#CCCCCC !important; \
    } " );

  //Skillelinie mellem indlæg og signatur
  GM_addStyle ("  \
    hr.ipsHr {  \
       border-width:1px 0 0 0 !important;  \
       border-color:#CCCCCC !important; \
    } " );

  //Fjerner "Announcement" (Ordensregler) i toppen
  GM_addStyle ("  \
    .ipsWidget_horizontal {  \
       display:none !important; \
    } " );

  //Fjerner "Announcement" (Ordensregler) i højre side
  GM_addStyle ("  \
    .ipsWidget_vertical {  \
       display:none !important; \
    } " );

  //Fjerner hele højre side, så forumoversigt fylder hele bredden
  GM_addStyle ("  \
    .ipsLayout_sidebarright {  \
       display:none !important; \
    } " );

  //Skjuler den ikke-funktionelle "Hurtigmenu"
  GM_addStyle ("  \
    .elNavigation_app_cms_0 {  \
       display:none !important; \
    } " );





//Laver lidt nye menupunkter
    
var mainNav = $('#ipsLayout_mainNav');

if (mainNav.length > 0) {

    var li = $('<li />');
    li.attr('data-role', 'navItem');
    li.attr('data-originalwidth', '75');
    
    a = $('<a>');
    a.attr('href', 'http://dindebat.dk/new-content/?type=forums_topic&sortby=last_real_post&sortdirection=desc&onlyFollowed=0&vncTimePeriod=week&onlyUnread=0&change_section=1');
    a.attr('class', 'elNavigation_app_forums_Forums');
    a.append('Nyt');
    a.appendTo(li);
    
    li.appendTo(mainNav);
    
    
    var li2 = $('<li />');
    li2.attr('data-role', 'navItem');
    li2.attr('data-originalwidth', '75');
    
    a2 = $('<a>');
    a2.attr('href', 'http://dindebat.dk/new-content/?type=forums_topic&sortby=last_real_post&sortdirection=desc&onlyFollowed=0&vncTimePeriod=week&onlyUnread=1&change_section=1');
    a2.attr('class', 'elNavigation_app_forums_Forums');
    a2.append('Nyt Ulæst');
    a2.appendTo(li2);
    
    li2.appendTo(mainNav);
    
    
    var li3 = $('<li />');
    li3.attr('data-role', 'navItem');
    li3.attr('data-originalwidth', '75');
    
    a3 = $('<a>');
    a3.attr('href', 'http://dindebat.dk/new-content/?type=forums_topic&sortby=last_real_post&sortdirection=desc&onlyFollowed=1&vncTimePeriod=all&onlyUnread=0&change_section=1');
    a3.attr('class', 'elNavigation_app_forums_Forums');
    a3.append('Følger');
    a3.appendTo(li3);
    
    li3.appendTo(mainNav);
    
    
    var li4 = $('<li />');
    li4.attr('data-role', 'navItem');
    li4.attr('data-originalwidth', '75');
    
    a4 = $('<a>');
    a4.attr('href', 'http://dindebat.dk/new-content/?type=forums_topic&sortby=last_real_post&sortdirection=desc&onlyFollowed=1&vncTimePeriod=all&onlyUnread=1&change_section=1');
    a4.attr('class', 'elNavigation_app_forums_Forums');
    a4.append('Følger Ulæst');
    a4.appendTo(li4);
    
    li4.appendTo(mainNav);
    
}