Add megaq and update compact-boardlist and general boardlist / top bar alias support
This commit is contained in:
parent
c9ffd19f85
commit
befe9515c1
@ -145,8 +145,32 @@ function initCompactBoardList() { //Pashe, influenced by tux, et al, WTFPL
|
|||||||
var board = this.item.boards[j];
|
var board = this.item.boards[j];
|
||||||
|
|
||||||
var tag;
|
var tag;
|
||||||
|
var menuitemname = board.uri;
|
||||||
|
var tinyalias = {"$$$" : "$", "rules" : "law" , "faq" : "?" , "news" : "n" , "diy" : "Δ", "sec" : "s", "tech" : "Ω", "inter" : 'i', "lit" : "l", "music" : "mu" , "vis" : "v" , "hum" : "h", "drg" : "d" , "zzz" : "z" , "layer" : "ddt" ,"cult" : "c" , "psy" : "p", "mega" : "me" , "random" : "ra", "radio" : "rad", "stream" : "mov", "cal" : "ca"};
|
||||||
|
var legacyalias = { "Δ" : "diy", "Ω" : "tech", "drug" : "drg", "hum" : "feels"};
|
||||||
|
var unicodealias = {"$$$": "💸", "rules" : "⚖️" , "faq" : "⁉️" , "news" : "📰" , "diy" : "🔧" , "Δ" : "🔧", "sec" : "🔒", "tech" : "💻", "Ω" : "💻", "inter" : "🎮", "lit" : "✍️", "music" : "🎼" , "vis" : "🎨" , "hum" : "👥", "drg" : "💊" , "drug" : "💊" , "zzz" : "💤" , "layer" : "㊙️" ,"cult" : "🎭" , "psy" : "🎆", "mega" : "📣" , "random" : "🎲", "radio" : "📻", "stream" : "📺", "zine" : "📓", "irc" : "📝", "q" : "❓", "r" : "🎲", "cal" : "📅"};
|
||||||
|
|
||||||
|
if (getSetting("compactboardlisttinyalias")) {
|
||||||
|
menuitemname = tinyalias[board.uri];
|
||||||
|
}
|
||||||
|
else if (getSetting("compactboardlistshortalias")){
|
||||||
|
menuitemname = shortalias[board.uri];
|
||||||
|
}
|
||||||
|
else if (getSetting("compactboardlistunicodealias")){
|
||||||
|
menuitemname = unicodealias[board.uri];
|
||||||
|
}
|
||||||
|
if (typeof menuitemname === "undefined"){
|
||||||
|
menuitemname = board.uri;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (getSetting("boardlistmegaq")) {
|
||||||
|
if (board === "mega"){
|
||||||
|
$(this).attr("href", "https://lainchan.org/megaq/index.html");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (board.name) {
|
if (board.name) {
|
||||||
tag = $("<a href='"+board.href+"'><span>"+board.name+"</span><span class='cb-uri'>/"+board.uri+"/</span></a>")
|
tag = $("<a href='"+board.href+"'><span>"+board.name+"</span><span class='cb-uri'>"+menuitemname+"</span></a>")
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
tag = $("<a href='"+board.href+"'><span>"+board.uri+"</span><span class='cb-uri'><i class='fa fa-globe'></i></span></a>")
|
tag = $("<a href='"+board.href+"'><span>"+board.uri+"</span><span class='cb-uri'><i class='fa fa-globe'></i></span></a>")
|
||||||
|
Loading…
Reference in New Issue
Block a user