Added formatting and grid chat and mute and god knows send help please

This commit is contained in:
Fluffy Jenkins 2020-01-08 00:17:54 +00:00
parent d57ba9a337
commit 27d2aaa8ce
19 changed files with 2402 additions and 376 deletions

View file

@ -5,44 +5,20 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title</title>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.css" media="screen,projection"/>
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="toast.min.js"></script>
<style>
html {
height: 100%;
}
/* Style the tab */
div.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
/* Style the buttons inside the tab */
div.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
}
/* Change background color of buttons on hover */
div.tab button:hover {
background-color: #ddd;
}
/* Create an active/current tablink class */
div.tab button.active {
background-color: #ccc;
}
div.dockButton {
position: absolute; /*or fixed*/
@ -97,25 +73,14 @@
min-height: 100vh;
font-size: 20px;
width: 100%;
display: flex;
flex-direction: column;
}
.TopBar {
height: 40px;
background: linear-gradient(#2b2b2b, #1e1e1e);
font-weight: bold;
padding: 10px 10px 10px 10px;
display: flex;
align-items: center;
width: 100vw;
font-size: 28px;
height: 100%;
}
.ChatLog {
height: calc(100vh - 169px);
width: calc(100vw - 40px);
padding: 20px;
height: calc(100vh - 128px);
/*height: calc(100vh - 103px);
width: calc(100vw - 40px);*/
padding: 20px !important;
font-size: 20px;
color: white;
background-color: black;
@ -137,6 +102,7 @@
.LogLogLine {
margin-bottom: 15px;
padding: 10px !important;
}
.LogLogLineMessage {
@ -145,15 +111,17 @@
.ChatInput {
color: #252525;
/*background: linear-gradient(#575757 20%, #252525 100%);*/
background: #252525;
height: 60px !important;
}
.ChatInputText {
padding: 5px 0px 0px 5px;
height: 60px !important;
padding: 5px !important;
height: 50px !important;
width: 100vw;
font-size: 20px !important;
background-color: white !important;
border: white !important;
}
.responsive {
@ -162,47 +130,76 @@
height: auto;
}
.row .col {
padding: 0;
}
.switch label .lever {
content: "";
display: inline-block;
position: relative;
width: 36px;
height: 14px;
background-color: rgba(0, 0, 0, 0.38);
border-radius: 15px;
margin-right: 10px;
-webkit-transition: background 0.3s ease;
transition: background 0.3s ease;
vertical-align: middle;
margin: 0 16px;
}
.muteSwitch label input[type=checkbox]:checked + .lever:after {
background-color: #a62113 !important;
}
</style>
</head>
<body>
<div class="Content row">
<div class="Content">
<div id="TopBar" class="TopBar">
<div class="tab">
<button class="tablinks" onclick="switchTab(event, 'Local')" id="defaultOpen">Local</button>
<button class="tablinks" onclick="switchTab(event, 'Domain')">Domain</button>
<button class="tablinks" onclick="switchTab(event, 'FluffyDev')">FluffyDev</button>
<div class="col s12 valign-wrapper" style="padding: 10px ">
<ul class="tabs tabs-fixed-width z-depth-2 col s6" id="tabs">
<li class="tab col s2"><a class="black-text active" href="#Local">Local</a></li>
<li class="tab col s2"><a class="black-text" href="#Domain">Domain</a></li>
<li class="tab col s2"><a class="black-text" href="#Grid">Grid</a></li>
</ul>
<span class="col s1">
</span>
<div class="switch muteSwitch col s2">
<label>
<span style="font-size: 20px" id="muteText">Mute</span>
<input type="checkbox" id="muteInput" onclick="muteSwitchToggle()">
<span class="lever waves-light"></span>
</label>
</div>
<div class="topBarFiller">
</div>
<div class="dockButton">
<button class="dockButton_" onclick="redock()">Redock</button>
</div>
</div>
<div id="Local" class="TabContent ChatLog">
<span class="col s1">
</span>
<a class="waves-effect waves-light btn col s2" onclick="redock()">Redock</a>
</div>
<div id="Local" class="ChatLog col s12"></div>
<div id="Domain" class="col s12 ChatLog"></div>
<div id="Grid" class="col s12 ChatLog"></div>
<input type="text" class="ChatInputText col s12" id="ChatInputText" size="256">
<div id="Domain" class="TabContent ChatLog">
</div>
<div id="FluffyDev" class="TabContent ChatLog">
</div>
<div class="ChatInput">
<input type="text" class="ChatInputText" id="ChatInputText" size="256">
</div>
</div>
</body>
<script>
var muted = {"Local": false, "Domain": false, "Grid": false};
var instance;
var appUUID;
var messageData = {}; // The data that is sent along with the message.
var $ChatLog; // The scrolling chat log.
var $ChatInputText; // The text field for entering text.
var userName;
//Start George Function
//Function provided by George Deac
//linky function
//$('#ChatInputText').twemojiPicker();
(function ($) {
"use strict";
@ -211,8 +208,9 @@
return this.each(function () {
var $el = $(this),
linkifiedContent = _linkify($el, options);
var formattedContent = replaceFormatting(linkifiedContent);
$el.html(linkifiedContent);
$el.html(formattedContent);
});
};
@ -284,13 +282,13 @@
case ext == "JPG":
case ext == "GIF":
case ext == "JPEG":
elContent = elContent.replace(this, "<br/><img src='" + this + "'class=\"responsive\"><br/><a href=\"javascript:gotoClipboard('" + this + "');\" target='_blank'>" + this + "</a>");
elContent = elContent.replace(this, "<br/><img src='" + this + "'class=\"responsive z-depth-2\"><br/><a href=\"javascript:gotoClipboard('" + this + "');\" target='_blank'>" + this + "</a>");
break;
case ext == "iframe":
elContent = elContent.replace(this, "<br/><iframe src='" + this + "'width=\"440\" height=\"248\" frameborder=\"0\"></iframe>");
elContent = elContent.replace(this, "<br/><iframe class=\"z-depth-2\" src='" + this + "'width=\"440\" height=\"248\" frameborder=\"0\"></iframe>");
break;
case ext == "webm":
elContent = elContent.replace(this, "<br/><video controls class=\"responsive\"><source src='" + this + "' type='video/" + ext + "'></video><br/><a href=\"javascript:gotoClipboard('" + this + "');\">" + this + "</a>");
elContent = elContent.replace(this, "<br/><video controls class=\"z-depth-2 responsive\"><source src='" + this + "' type='video/" + ext + "'></video><br/><a href=\"javascript:gotoClipboard('" + this + "');\">" + this + "</a>");
break;
case protocol === "HIFI":
case protocol === "hifi":
@ -299,7 +297,7 @@
case !!this.match(/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?(?=.*v=((\w|-){11}))(?:\S+)?$/):
var youtubeMatch = this.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
if (youtubeMatch && youtubeMatch[2].length == 11 && this.match(/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?(?=.*v=((\w|-){11}))(?:\S+)?$/)) {
elContent = "<br/><iframe width='420' height='236' src='https://www.youtube.com/embed/" + youtubeMatch[2] + "' frameborder='0'></iframe><br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>";
elContent = "<br/><iframe class=\"z-depth-2\" width='420' height='236' src='https://www.youtube.com/embed/" + youtubeMatch[2] + "' frameborder='0'></iframe><br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>";
break;
}
// else fall through to default
@ -328,8 +326,67 @@
}(jQuery));
//End George Function
var appUUID;
function replaceFormatting(text) {
var found = false;
if (text.indexOf("**") !== -1) {
var firstMatch = text.indexOf("**") + 2;
var secondMatch = text.indexOf("**", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 2);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 2);
text = part1 + "<i>" + part2 + "</i>" + part3;
}
} else if (text.indexOf("*") !== -1) {
var firstMatch = text.indexOf("*") + 1;
var secondMatch = text.indexOf("*", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 1);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 1);
text = part1 + "<b>" + part2 + "</b>" + part3;
}
} else if (text.indexOf("__") !== -1) {
var firstMatch = text.indexOf("__") + 2;
var secondMatch = text.indexOf("__", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 2);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 2);
text = part1 + "<ins>" + part2 + "</ins>" + part3;
}
} else if (text.indexOf("_") !== -1) {
var firstMatch = text.indexOf("_") + 1;
var secondMatch = text.indexOf("_", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 1);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 1);
text = part1 + "<i>" + part2 + "</i>" + part3;
}
} else if (text.indexOf("~~") !== -1) {
var firstMatch = text.indexOf("~~") + 2;
var secondMatch = text.indexOf("~~", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 2);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 2);
text = part1 + "<del>" + part2 + "</del>" + part3;
}
}
if (found) {
return replaceFormatting(text);
} else {
return text;
}
}
function gotoHiFi(url) {
emitWebEvent({type: "CMD", cmd: "GOTO", url: url});
@ -340,15 +397,7 @@
}
function gotoClipboard(url) {
var options = {
style: {
main: {
background: "#9c27b0",
color: "white"
}
}
};
iqwerty.toast.Toast('Copied URL to Clipboard',options);
M.toast({html: 'Copied URL to Clipboard', classes: 'rounded pink white-text'});
emitWebEvent({type: "CMD", cmd: "COPY", url: url});
}
@ -375,22 +424,8 @@
return "#" + red + green + blue;
}
var messageData = {}; // The data that is sent along with the message.
var $ChatLog; // The scrolling chat log.
var $ChatInputText; // The text field for entering text.
var userName;
function getCurrTab() {
var TabContent = document.getElementsByClassName("TabContent");
for (var i = 0; i < TabContent.length; i++) {
if (TabContent[i].style.display === "inline") {
return TabContent[i];
}
}
return instance.$activeTabLink.html();
}
function redock() {
@ -398,57 +433,25 @@
location.reload();
}
function switchTab(evt, tabName) {
// Declare all variables
var i, TabContent, tablinks;
// Get all elements with class="tabcontent" and hide them
TabContent = document.getElementsByClassName("TabContent");
for (i = 0; i < TabContent.length; i++) {
TabContent[i].style.display = "none";
}
// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(tabName).style.display = "inline";
evt.currentTarget.className += " active";
scrollChatLog(tabName);
}
function logMessage(userName, message, logScreen, colour) {
var LogScreen = $("#" + logScreen);
/*EventBridge.emitWebEvent(
JSON.stringify({
type: "sendMessage",
userName: userName,
message: message,
chatID: LogScreen.id
}));*/
var $logLine =
$('<div/>')
.addClass('LogLogLine')
.addClass('card-panel')
.addClass('blue-grey')
.addClass('darken-4')
.addClass('z-depth-2')
.data('chat-message', message).css("color", rgbToHex(colour))
.appendTo(LogScreen);
var $logLineMessage =
$('<b/>')
.addClass('LogLogLineMessage')
.text(userName + ": ").css("color", rgbToHex(colour))
.appendTo(LogScreen);
var $logLineMessage2 =
$('<span/>')
.addClass('LogLogLineMessage')
.text(message).css("color", rgbToHex(colour)).linky()
.appendTo(LogScreen);/*
$logLineMessage2.html($logLineMessage2.html().replace(/(http:\/\/[^\s]+)/g, "<a href='$1' target='_blank'>$1</a>"));
$logLineMessage2.html($logLineMessage2.html().replace(/(https:\/\/[^\s]+)/g, "<a href='$1' target='_blank'>$1</a>"));
$logLineMessage2.html($logLineMessage2.html().replace(/(hifi:\/\/[^\s]+)/g, "<a href='$1' target='_blank'>$1</a>"));*/
$('<b/>')
.addClass('LogLogLineMessage')
.text(userName + ": ").css("color", rgbToHex(colour))
.appendTo($logLine);
$('<span/>')
.addClass('LogLogLineMessage')
.text(message).css("color", rgbToHex(colour)).linky()
.appendTo($logLine);
}
function scrollChatLog(chatID) {
@ -468,70 +471,96 @@
return h2 + ":" + m2 + ":" + s2;
}
var muteInput;
var muteText;
function muteSwitchToggle() {
muted[getCurrTab()] = muteInput.checked;
muteText.classList.add(muteInput.checked ? "red-text" : "white-text");
muteText.classList.remove(!muteInput.checked ? "red-text" : "white-text");
emitWebEvent({type: "CMD", cmd: "MUTED", muted: muted});
}
function main() {
muteInput = document.getElementById("muteInput");
muteText = document.getElementById("muteText");
instance = M.Tabs.init(document.getElementById("tabs"), {
"onShow": function (e) {
scrollChatLog(getCurrTab());
muteInput.checked = muted[getCurrTab()];
muteText.classList.add(muteInput.checked ? "red-text" : "white-text");
muteText.classList.remove(!muteInput.checked ? "red-text" : "white-text");
}
});
instance.select("Local");
$('.modal').modal();
var parsedUrl = new URL(window.location.href);
appUUID = parsedUrl.searchParams.get("appUUID");
//console.log("ChatPage: main");
$ChatLog = $('#Local');
$ChatInputText = $('#ChatInputText');
// Whenever the chat log resizes, or the input text gets or loses focus,
// scroll the chat log to the last line.
$ChatInputText.on('focus blur', function (event) {
//console.log("ChatInputText focus blur", $ChatInputText, event);
scrollChatLog(getCurrTab().id);
$ChatInputText.on('focus', function (event) {
scrollChatLog(getCurrTab());
});
// Track when the user is typing, and handle the message when the user hits return.
$ChatInputText.on('keydown', function (event) {
if (event.keyCode === 13) {
var message = $ChatInputText.val().substr(0, 256);
$ChatInputText.val('');
if (message !== '') {
var tab = getCurrTab();
if (tab === "Grid") {
emitWebEvent({type: "WEBMSG", message: message, tab: tab, time: time()});
} else {
emitWebEvent({type: "MSG", message: message, tab: tab, time: time()});
}
emitWebEvent({type: "MSG", message: message, tab: getCurrTab().id, time: time()});
console.log("getCurrTab: ", getCurrTab().id);
console.log("getCurrTab: ", getCurrTab());
}
}
});
// Start out with the input text in focus.
$ChatInputText.focus();
// Hook up a handler for events that come from hifi.
if (window.qt) {
setTimeout(function () {
console.log("connecting to eventbridge");
EventBridge.scriptEventReceived.connect(function (message) {
var temp = [];
var cmd = [];
try {
temp = JSON.parse(message);
cmd = JSON.parse(message);
} catch (e) {
//
}
if (temp.length === 1) {
var temp2 = temp[0];
logMessage("[" + temp2[0] + "] " + temp2[2], temp2[1], temp2[4], temp2[3]);
scrollChatLog(temp2[4]);
} else if (temp.length > 1) {
temp.forEach(function (msg) {
logMessage("[" + msg[0] + "] " + msg[2], msg[1], msg[4], msg[3]);
scrollChatLog(msg[4]);
});
if (cmd.type === "MSG") {
var temp = cmd.data;
if (temp.length === 1) {
var temp2 = temp[0];
logMessage("[" + temp2[0] + "] " + temp2[2], temp2[1], temp2[4], temp2[3]);
scrollChatLog(temp2[4]);
} else if (temp.length > 1) {
temp.forEach(function (msg) {
logMessage("[" + msg[0] + "] " + msg[2], msg[1], msg[4], msg[3]);
scrollChatLog(msg[4]);
});
}
} else if (cmd.type === "CMD") {
if (cmd.cmd === "MUTED") {
muted = cmd.muted;
muteInput.checked = muted[getCurrTab()];
muteText.classList.add(muteInput.checked ? "red-text" : "white-text");
muteText.classList.remove(!muteInput.checked ? "red-text" : "white-text");
}
}
});
}, 100); // Delay to allow everything to settle
}
// Start out with the input text in focus.
$ChatInputText.focus();
if (window.qt) {
@ -544,10 +573,8 @@
}
}
// Start up once the document is loaded.
$(document).ready(main);
document.getElementById("defaultOpen").click();
</script>
<script type="text/javascript" src="js/materialize.min.js"></script>
</html>

View file

@ -22,8 +22,23 @@ var chatBar;
var chatHistory;
var historyLog = [];
var visible = false;
var historyVisible = false;
var settingsRoot = "FloofChat";
var muted = Settings.getValue(settingsRoot + "/muted", {"Local": false, "Domain": false, "Grid": false});
var ws;
var wsReady = false;
var webSocketURL = "ws://gridchat.darlingvr.club:8090";
var shutdownBool = false;
var defaultColour = {red: 255, green: 255, blue: 255};
var colours = {};
colours["localChatColour"] = Settings.getValue(settingsRoot + "/localChatColour", defaultColour);
colours["domainChatColour"] = Settings.getValue(settingsRoot + "/domainChatColour", defaultColour);
colours["gridChatColour"] = Settings.getValue(settingsRoot + "/gridChatColour", defaultColour);
init();
@ -31,7 +46,7 @@ function init() {
Messages.subscribe("Chat");
historyLog = [];
try {
historyLog = JSON.parse(Settings.getValue("HistoryLog", "[]"));
historyLog = JSON.parse(Settings.getValue(settingsRoot + "/HistoryLog", "[]"));
} catch (e) {
//
}
@ -39,7 +54,6 @@ function init() {
setupHistoryWindow(false);
chatBar = new OverlayWindow({
// source: "http://localhost:8000/fluffytest.qml",
source: Paths.defaultScripts + '/communityModules/chat/FloofChat.qml?' + Date.now(),
width: 360,
height: 180
@ -50,34 +64,81 @@ function init() {
chatBar.sendToQml(JSON.stringify({visible: false}));
Controller.keyPressEvent.connect(keyPressEvent);
Messages.messageReceived.connect(messageReceived);
connectWebSocket();
}
function setupHistoryWindow(popout) {
if (!popout) {
chatHistory = new OverlayWebWindow({
title: 'Chat History',
source: ROOT + "FloofChat2.html?appUUID=" + appUUID + "&" + Date.now(),
width: 900,
height: 700,
visible: false
});
chatHistory.setPosition({x: 0, y: Window.innerHeight - 700});
chatHistory.webEventReceived.connect(onWebEventReceived);
chatHistory.closed.connect(toggleChatHistory);
function connectWebSocket(timeout) {
ws = new WebSocket(webSocketURL);
ws.onmessage = function incoming(_data) {
var message = _data.data;
var cmd = {FAILED: true};
try {
cmd = JSON.parse(message);
} catch (e) {
//
}
if (!cmd.FAILED) {
addToLog(cmd.message, cmd.displayName, cmd.colour, cmd.channel);
if (!muted["Grid"]) {
Messages.sendLocalMessage("Floof-Notif", JSON.stringify({
sender: "(G) " + cmd.displayName,
text: replaceFormatting(cmd.message),
colour: {text: cmd.colour}
}));
}
}
};
ws.onopen = function open() {
wsReady = true;
};
ws.onclose = function close() {
wsReady = false;
console.log('disconnected');
timeout = timeout | 0;
if (!shutdownBool && timeout < (30 * 1000)) {
Script.setTimeout(function () {
connectWebSocket(timeout);
}, timeout + 1000);
} else {
wsReady = -1;
}
};
}
function sendWS(msg, timeout) {
if (wsReady === true) {
ws.send(JSON.stringify(msg));
} else {
chatHistory = Desktop.createWindow(Paths.defaultScripts + '/communityModules/chat/webview.qml?' + Date.now(), {
title: "Chat History",
additionalFlags: Desktop.CLOSE_BUTTON_HIDES,
presentationMode: Desktop.PresentationMode.NATIVE,
visible: false,
size: {x: 900, y: 700},
position: {x: 0, y: Window.innerHeight - 700}
});
chatHistory.webEventReceived.connect(onWebEventReceived);
chatHistory.closed.connect(toggleChatHistory);
timeout = timeout | 0;
if (!shutdownBool && timeout < (30 * 1000)) {
Script.setTimeout(function () {
if (wsReady === -1) {
connectWebSocket();
}
sendWS(msg, timeout);
}, timeout + 1000);
}
}
}
function setupHistoryWindow() {
chatHistory = new OverlayWebWindow({
title: 'Chat History',
source: ROOT + "FloofChat.html?appUUID=" + appUUID + "&" + Date.now(),
width: 900,
height: 700,
visible: false
});
chatHistory.setPosition({x: 0, y: Window.innerHeight - 700});
chatHistory.webEventReceived.connect(onWebEventReceived);
chatHistory.closed.connect(toggleChatHistory);
}
function emitScriptEvent(obj) {
obj.appUUID = appUUID;
tablet.emitScriptEvent(JSON.stringify(obj));
@ -89,19 +150,35 @@ function toggleChatHistory() {
chatHistory.visible = historyVisible;
}
function chatColour(tab) {
if (tab === "Local") {
return colours["localChatColour"];
} else if (tab === "Domain") {
return colours["domainChatColour"];
} else if (tab === "Grid") {
return colours["gridChatColour"];
} else {
return defaultColour;
}
}
function onWebEventReceived(event) {
console.log("event " + event);
event = JSON.parse(event);
if (event.type === "ready") {
chatHistory.emitScriptEvent(JSON.stringify(historyLog));
chatHistory.emitScriptEvent(JSON.stringify({type: "MSG", data: historyLog}));
chatHistory.emitScriptEvent(JSON.stringify({type: "CMD", cmd: "MUTED", muted: muted}));
}
if (event.type === "CMD") {
if (event.cmd === "MUTED") {
muted = event.muted;
Settings.setValue(settingsRoot + "/muted", muted);
}
if (event.cmd === "COLOUR") {
Settings.setValue(settingsRoot + "/" + event.colourType + "Colour", event.colour);
colours[event.colourType] = event.colour;
}
if (event.cmd === "REDOCK") {
if(popout){
}else{
chatHistory.setPosition({x: 0, y: Window.innerHeight - 700});
}
chatHistory.setPosition({x: 0, y: Window.innerHeight - 700});
}
if (event.cmd === "GOTO") {
var result = Window.confirm("Do you want to goto " + event.url.split("/")[2] + " ?");
@ -122,13 +199,24 @@ function onWebEventReceived(event) {
Window.copyToClipboard(event.url);
}
}
if (event.type === "WEBMSG") {
if (event.message === "") return;
sendWS({
uuid: "",
type: "WebChat",
channel: event.tab,
colour: chatColour(event.tab),
message: event.message,
displayName: MyAvatar.displayName
});
}
if (event.type === "MSG") {
if (event.message === "") return;
Messages.sendMessage("Chat", JSON.stringify({
type: "TransmitChatMessage",
position: MyAvatar.position,
channel: event.tab,
colour: {red: 222, green: 222, blue: 222},
colour: chatColour(event.tab),
message: event.message,
displayName: MyAvatar.displayName
}));
@ -136,9 +224,68 @@ function onWebEventReceived(event) {
}
}
function messageReceived(channel, message, sender, local) {
if (channel === "Chat" || channel === "Support") {
function replaceFormatting(text) {
var found = false;
if (text.indexOf("**") !== -1) {
var firstMatch = text.indexOf("**") + 2;
var secondMatch = text.indexOf("**", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 2);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 2);
text = part1 + "<i>" + part2 + "</i>" + part3;
}
} else if (text.indexOf("*") !== -1) {
var firstMatch = text.indexOf("*") + 1;
var secondMatch = text.indexOf("*", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 1);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 1);
text = part1 + "<b>" + part2 + "</b>" + part3;
}
} else if (text.indexOf("__") !== -1) {
var firstMatch = text.indexOf("__") + 2;
var secondMatch = text.indexOf("__", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 2);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 2);
text = part1 + "<u>" + part2 + "</u>" + part3;
}
} else if (text.indexOf("_") !== -1) {
var firstMatch = text.indexOf("_") + 1;
var secondMatch = text.indexOf("_", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 1);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 1);
text = part1 + "<i>" + part2 + "</i>" + part3;
}
} else if (text.indexOf("~~") !== -1) {
var firstMatch = text.indexOf("~~") + 2;
var secondMatch = text.indexOf("~~", firstMatch);
if (firstMatch !== -1 && secondMatch !== -1) {
found = true;
var part1 = text.substring(0, firstMatch - 2);
var part2 = text.substring(firstMatch, secondMatch);
var part3 = text.substring(secondMatch + 2);
text = part1 + "<s>" + part2 + "</s>" + part3;
}
}
if (found) {
return replaceFormatting(text);
} else {
return text;
}
}
function messageReceived(channel, message) {
if (channel === "Chat") {
var cmd = {FAILED: true};
try {
cmd = JSON.parse(message);
@ -153,20 +300,44 @@ function messageReceived(channel, message, sender, local) {
if (!cmd.hasOwnProperty("colour")) {
cmd.colour = {red: 222, green: 222, blue: 222};
}
if (cmd.message.indexOf("/me") === 0) {
cmd.message = cmd.message.replace("/me", cmd.displayName);
cmd.displayName = "";
}
if (cmd.channel === "Local") {
if (Vec3.withinEpsilon(MyAvatar.position, cmd.position, 20)) {
addToLog(cmd.message, cmd.displayName, cmd.colour, cmd.channel);
if (!muted["Local"]) {
Messages.sendLocalMessage("Floof-Notif", JSON.stringify({
sender: "(L) " + cmd.displayName,
text: replaceFormatting(cmd.message),
colour: {text: cmd.colour}
}));
}
}
} else if (cmd.channel === "Domain") {
addToLog(cmd.message, cmd.displayName, cmd.colour, cmd.channel);
if (!muted["Domain"]) {
Messages.sendLocalMessage("Floof-Notif", JSON.stringify({
sender: "L " + cmd.displayName,
text: cmd.message,
sender: "(D) " + cmd.displayName,
text: replaceFormatting(cmd.message),
colour: {text: cmd.colour}
}));
}
} else if (cmd.channel === "Grid") {
addToLog(cmd.message, cmd.displayName, cmd.colour, cmd.channel);
if (!muted["Grid"]) {
Messages.sendLocalMessage("Floof-Notif", JSON.stringify({
sender: "(G) " + cmd.displayName,
text: replaceFormatting(cmd.message),
colour: {text: cmd.colour}
}));
}
} else {
addToLog(cmd.message, cmd.displayName, cmd.colour, cmd.channel);
Messages.sendLocalMessage("Floof-Notif", JSON.stringify({
sender: ((cmd.channel === "Domain") ? "D " : "") + cmd.displayName,
text: cmd.message,
sender: cmd.displayName,
text: replaceFormatting(cmd.message),
colour: {text: cmd.colour}
}));
}
@ -189,13 +360,16 @@ function time() {
function addToLog(msg, dp, colour, tab) {
historyLog.push([time(), msg, dp, colour, tab]);
chatHistory.emitScriptEvent(JSON.stringify([[time(), msg, dp, colour, tab]]));
chatHistory.emitScriptEvent(JSON.stringify({type: "MSG", data: [[time(), msg, dp, colour, tab]]}));
if (historyLog.length > 500) {
historyLog.pop();
}
Settings.setValue("HistoryLog", JSON.stringify(historyLog))
Settings.setValue(settingsRoot + "/HistoryLog", JSON.stringify(historyLog))
}
const CONTROL = 67108864;
const SHIFT = 33554432;
function fromQml(message) {
var cmd = {FAILED: true};
try {
@ -204,21 +378,29 @@ function fromQml(message) {
//
}
if (!cmd.FAILED) {
console.log(JSON.stringify(cmd.event));
if (cmd.type === "MSG") {
if (cmd.message !== "") {
if (cmd.event.modifiers === 67108864) {
if (cmd.event.modifiers === CONTROL) {
Messages.sendMessage("Chat", JSON.stringify({
type: "TransmitChatMessage", channel: "Domain", colour: {red: 222, green: 222, blue: 222},
type: "TransmitChatMessage", channel: "Domain", colour: chatColour("Domain"),
message: cmd.message,
displayName: MyAvatar.displayName
}));
} else if (cmd.event.modifiers === CONTROL + SHIFT) {
sendWS({
uuid: "",
type: "WebChat",
channel: "Grid",
colour: chatColour("Grid"),
message: cmd.message,
displayName: MyAvatar.displayName
});
} else {
Messages.sendMessage("Chat", JSON.stringify({
type: "TransmitChatMessage",
channel: "Local",
position: MyAvatar.position,
colour: {red: 222, green: 222, blue: 222},
colour: chatColour("Local"),
message: cmd.message,
displayName: MyAvatar.displayName
}));
@ -229,13 +411,6 @@ function fromQml(message) {
if (cmd.cmd === "Clicked") {
toggleChatHistory()
}
/*
Messages.sendLocalMessage("Floof-Notif", JSON.stringify({
sender: "Chat",
text: msg,
colour: {text: {red: 200, green: 200, blue: 200}}
}));*/
}
}
}
@ -254,7 +429,6 @@ function setVisible(_visible) {
}));
chatBar.sendToQml(JSON.stringify({visible: false}));
}
visible = _visible;
}
@ -270,7 +444,6 @@ function keyPressEvent(event) {
}
}
function shutdown() {
try {
Messages.messageReceived.disconnect(messageReceived);

View file

@ -5,12 +5,6 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Title</title>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link type="text/css" rel="stylesheet" href="css/materialize.css" media="screen,projection"/>
<link href="https://fonts.googleapis.com/css?family=Raleway:300,400,600,700" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="toast.min.js"></script>
@ -20,6 +14,34 @@
height: 100%;
}
/* Style the tab */
div.tab {
overflow: hidden;
border: 1px solid #ccc;
background-color: #f1f1f1;
}
/* Style the buttons inside the tab */
div.tab button {
background-color: inherit;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
}
/* Change background color of buttons on hover */
div.tab button:hover {
background-color: #ddd;
}
/* Create an active/current tablink class */
div.tab button.active {
background-color: #ccc;
}
div.dockButton {
@ -75,15 +97,25 @@
min-height: 100vh;
font-size: 20px;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
}
.TopBar {
height: 40px;
background: linear-gradient(#2b2b2b, #1e1e1e);
font-weight: bold;
padding: 10px 10px 10px 10px;
display: flex;
align-items: center;
width: 100vw;
font-size: 28px;
}
.ChatLog {
height: calc(100vh - 128px);
/*height: calc(100vh - 103px);
width: calc(100vw - 40px);*/
padding: 20px !important;
height: calc(100vh - 169px);
width: calc(100vw - 40px);
padding: 20px;
font-size: 20px;
color: white;
background-color: black;
@ -105,7 +137,6 @@
.LogLogLine {
margin-bottom: 15px;
padding: 10px !important;
}
.LogLogLineMessage {
@ -114,17 +145,15 @@
.ChatInput {
color: #252525;
background: #252525;
/*background: linear-gradient(#575757 20%, #252525 100%);*/
height: 60px !important;
}
.ChatInputText {
padding: 5px !important;
height: 50px !important;
padding: 5px 0px 0px 5px;
height: 60px !important;
width: 100vw;
font-size: 20px !important;
background-color: white !important;
border: white !important;
}
.responsive {
@ -133,10 +162,6 @@
height: auto;
}
.row .col {
padding: 0;
}
</style>
</head>
@ -144,28 +169,37 @@
<body>
<div class="Content row">
<div class="col s12 valign-wrapper" style="padding: 10px ">
<ul class="tabs tabs-fixed-width z-depth-2 col s6" id="tabs">
<li class="tab col s2"><a class="black-text active" href="#Local">Local</a></li>
<li class="tab col s2"><a class="black-text" href="#Domain">Domain</a></li>
<li class="tab col s2"><a class="black-text" href="#FluffyDev">FluffyDev</a></li>
</ul>
<span class="col s4"></span>
<a class="waves-effect waves-light btn col s2" onclick="redock()">Redock</a>
<div class="Content">
<div id="TopBar" class="TopBar">
<div class="tab">
<button class="tablinks" onclick="switchTab(event, 'Local')" id="defaultOpen">Local</button>
<button class="tablinks" onclick="switchTab(event, 'Domain')">Domain</button>
<button class="tablinks" onclick="switchTab(event, 'FluffyDev')">FluffyDev</button>
</div>
<div class="topBarFiller">
</div>
<div class="dockButton">
<button class="dockButton_" onclick="redock()">Redock</button>
</div>
</div>
<div id="Local" class="ChatLog col s12">Test 1</div>
<div id="Domain" class="col s12 ChatLog">Test 2</div>
<div id="FluffyDev" class="col s12 ChatLog">Test 3</div>
<input type="text" class="ChatInputText col s12" id="ChatInputText" size="256">
<div id="Local" class="TabContent ChatLog">
</div>
<div id="Domain" class="TabContent ChatLog">
</div>
<div id="FluffyDev" class="TabContent ChatLog">
</div>
<div class="ChatInput">
<input type="text" class="ChatInputText" id="ChatInputText" size="256">
</div>
</div>
</body>
<script>
var instance;
//linky function
//$('#ChatInputText').twemojiPicker();
@ -250,13 +284,13 @@
case ext == "JPG":
case ext == "GIF":
case ext == "JPEG":
elContent = elContent.replace(this, "<br/><img src='" + this + "'class=\"responsive z-depth-2\"><br/><a href=\"javascript:gotoClipboard('" + this + "');\" target='_blank'>" + this + "</a>");
elContent = elContent.replace(this, "<br/><img src='" + this + "'class=\"responsive\"><br/><a href=\"javascript:gotoClipboard('" + this + "');\" target='_blank'>" + this + "</a>");
break;
case ext == "iframe":
elContent = elContent.replace(this, "<br/><iframe class=\"z-depth-2\" src='" + this + "'width=\"440\" height=\"248\" frameborder=\"0\"></iframe>");
elContent = elContent.replace(this, "<br/><iframe src='" + this + "'width=\"440\" height=\"248\" frameborder=\"0\"></iframe>");
break;
case ext == "webm":
elContent = elContent.replace(this, "<br/><video controls class=\"z-depth-2 responsive\"><source src='" + this + "' type='video/" + ext + "'></video><br/><a href=\"javascript:gotoClipboard('" + this + "');\">" + this + "</a>");
elContent = elContent.replace(this, "<br/><video controls class=\"responsive\"><source src='" + this + "' type='video/" + ext + "'></video><br/><a href=\"javascript:gotoClipboard('" + this + "');\">" + this + "</a>");
break;
case protocol === "HIFI":
case protocol === "hifi":
@ -265,7 +299,7 @@
case !!this.match(/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?(?=.*v=((\w|-){11}))(?:\S+)?$/):
var youtubeMatch = this.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/);
if (youtubeMatch && youtubeMatch[2].length == 11 && this.match(/^(?:https?:\/\/)?(?:www\.)?youtube\.com\/watch\?(?=.*v=((\w|-){11}))(?:\S+)?$/)) {
elContent = "<br/><iframe class=\"z-depth-2\" width='420' height='236' src='https://www.youtube.com/embed/" + youtubeMatch[2] + "' frameborder='0'></iframe><br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>";
elContent = "<br/><iframe width='420' height='236' src='https://www.youtube.com/embed/" + youtubeMatch[2] + "' frameborder='0'></iframe><br/><a href=\"javascript:gotoURL('" + this + "');\">" + this + "</a>";
break;
}
// else fall through to default
@ -314,8 +348,7 @@
}
}
};
M.toast({html: 'Copied URL to Clipboard', classes: 'rounded pink white-text'});
//iqwerty.toast.Toast('Copied URL to Clipboard', options);
iqwerty.toast.Toast('Copied URL to Clipboard',options);
emitWebEvent({type: "CMD", cmd: "COPY", url: url});
}
@ -350,7 +383,14 @@
function getCurrTab() {
return instance.$activeTabLink.html();
var TabContent = document.getElementsByClassName("TabContent");
for (var i = 0; i < TabContent.length; i++) {
if (TabContent[i].style.display === "inline") {
return TabContent[i];
}
}
}
function redock() {
@ -358,6 +398,28 @@
location.reload();
}
function switchTab(evt, tabName) {
// Declare all variables
var i, TabContent, tablinks;
// Get all elements with class="tabcontent" and hide them
TabContent = document.getElementsByClassName("TabContent");
for (i = 0; i < TabContent.length; i++) {
TabContent[i].style.display = "none";
}
// Get all elements with class="tablinks" and remove the class "active"
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
// Show the current tab, and add an "active" class to the button that opened the tab
document.getElementById(tabName).style.display = "inline";
evt.currentTarget.className += " active";
scrollChatLog(tabName);
}
function logMessage(userName, message, logScreen, colour) {
var LogScreen = $("#" + logScreen);
@ -372,22 +434,18 @@
var $logLine =
$('<div/>')
.addClass('LogLogLine')
.addClass('card-panel')
.addClass('blue-grey')
.addClass('darken-4')
.addClass('z-depth-2')
.data('chat-message', message).css("color", rgbToHex(colour))
.appendTo(LogScreen);
var $logLineMessage =
$('<b/>')
.addClass('LogLogLineMessage')
.text(userName + ": ").css("color", rgbToHex(colour))
.appendTo($logLine);
.appendTo(LogScreen);
var $logLineMessage2 =
$('<span/>')
.addClass('LogLogLineMessage')
.text(message).css("color", rgbToHex(colour)).linky()
.appendTo($logLine);/*
.appendTo(LogScreen);/*
$logLineMessage2.html($logLineMessage2.html().replace(/(http:\/\/[^\s]+)/g, "<a href='$1' target='_blank'>$1</a>"));
$logLineMessage2.html($logLineMessage2.html().replace(/(https:\/\/[^\s]+)/g, "<a href='$1' target='_blank'>$1</a>"));
$logLineMessage2.html($logLineMessage2.html().replace(/(hifi:\/\/[^\s]+)/g, "<a href='$1' target='_blank'>$1</a>"));*/
@ -412,13 +470,6 @@
function main() {
instance = M.Tabs.init(document.getElementById("tabs"), {
"onShow": function (e) {
scrollChatLog(getCurrTab());
}
});
instance.select("Local");
var parsedUrl = new URL(window.location.href);
appUUID = parsedUrl.searchParams.get("appUUID");
@ -429,9 +480,9 @@
// Whenever the chat log resizes, or the input text gets or loses focus,
// scroll the chat log to the last line.
$ChatInputText.on('focus', function (event) {
$ChatInputText.on('focus blur', function (event) {
//console.log("ChatInputText focus blur", $ChatInputText, event);
scrollChatLog(getCurrTab());
scrollChatLog(getCurrTab().id);
});
// Track when the user is typing, and handle the message when the user hits return.
@ -441,9 +492,9 @@
$ChatInputText.val('');
if (message !== '') {
emitWebEvent({type: "MSG", message: message, tab: getCurrTab(), time: time()});
emitWebEvent({type: "MSG", message: message, tab: getCurrTab().id, time: time()});
console.log("getCurrTab: ", getCurrTab());
console.log("getCurrTab: ", getCurrTab().id);
}
}
});
@ -496,8 +547,7 @@
// Start up once the document is loaded.
$(document).ready(main);
//document.getElementById("defaultOpen").click();
document.getElementById("defaultOpen").click();
</script>
<script type="text/javascript" src="js/materialize.min.js"></script>
</html>

View file

@ -1,67 +0,0 @@
Creative Commons Attribution-ShareAlike 2.5 License Agreement
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.
License
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.
1. Definitions
1. "Collective Work" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.
2. "Derivative Work" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License. For the avoidance of doubt, where the Work is a musical composition or sound recording, the synchronization of the Work in timed-relation with a moving image ("synching") will be considered a Derivative Work for the purpose of this License.
3. "Licensor" means the individual or entity that offers the Work under the terms of this License.
4. "Original Author" means the individual or entity who created the Work.
5. "Work" means the copyrightable work of authorship offered under the terms of this License.
6. "You" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.
7. "License Elements" means the following high-level license attributes as selected by Licensor and indicated in the title of this License: Attribution, ShareAlike.
2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.
3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:
1. to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;
2. to create and reproduce Derivative Works;
3. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;
4. to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.
5.
For the avoidance of doubt, where the work is a musical composition:
1. Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.
2. Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights society or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work ("cover version") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).
6. Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).
The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.
4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:
1. You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder. You may not sublicense the Work. You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Work itself to be made subject to the terms of this License. If You create a Collective Work, upon notice from any Licensor You must, to the extent practicable, remove from the Collective Work any credit as required by clause 4(c), as requested. If You create a Derivative Work, upon notice from any Licensor You must, to the extent practicable, remove from the Derivative Work any credit as required by clause 4(c), as requested.
2. You may distribute, publicly display, publicly perform, or publicly digitally perform a Derivative Work only under the terms of this License, a later version of this License with the same License Elements as this License, or a Creative Commons iCommons license that contains the same License Elements as this License (e.g. Attribution-ShareAlike 2.5 Japan). You must include a copy of, or the Uniform Resource Identifier for, this License or other license specified in the previous sentence with every copy or phonorecord of each Derivative Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Derivative Works that alter or restrict the terms of this License or the recipients' exercise of the rights granted hereunder, and You must keep intact all notices that refer to this License and to the disclaimer of warranties. You may not distribute, publicly display, publicly perform, or publicly digitally perform the Derivative Work with any technological measures that control access or use of the Work in a manner inconsistent with the terms of this License Agreement. The above applies to the Derivative Work as incorporated in a Collective Work, but this does not require the Collective Work apart from the Derivative Work itself to be made subject to the terms of this License.
3. If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing entity, journal) for attribution in Licensor's copyright notice, terms of service or by other reasonable means, the name of such party or parties; the title of the Work if supplied; to the extent reasonably practicable, the Uniform Resource Identifier, if any, that Licensor specifies to be associated with the Work, unless such URI does not refer to the copyright notice or licensing information for the Work; and in the case of a Derivative Work, a credit identifying the use of the Work in the Derivative Work (e.g., "French translation of the Work by Original Author," or "Screenplay based on original Work by Original Author"). Such credit may be implemented in any reasonable manner; provided, however, that in the case of a Derivative Work or Collective Work, at a minimum such credit will appear where any other comparable authorship credit appears and in a manner at least as prominent as such other comparable authorship credit.
5. Representations, Warranties and Disclaimer
UNLESS OTHERWISE AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE MATERIALS, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
7. Termination
1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.
2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this License), and this License will continue in full force and effect unless terminated as stated above.
8. Miscellaneous
1. Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.
2. Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.
3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.
5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.
Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunder, it shall have all rights and obligations of Licensor.
Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark "Creative Commons" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.
Creative Commons may be contacted at http://creativecommons.org/.

View file

@ -1,12 +0,0 @@
Tango Icon Theme
----------------
This is an icon theme that follows the Tango visual guidelines [1]. Currently
it depends on Imagemagick for creation of 24x24 bitmaps by adding a 1px padding
around the 22x22px version. For GNOME and KDE you will also need
icon-naming-utils that allow the theme to work in these environments before
they follow the new naming scheme [2].
[1] http://tango-project.org/Tango_Icon_Theme_Guidelines
[2] http://tango-project.org/Standard_Icon_Naming_Specification

Binary file not shown.

Before

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 936 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 855 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 949 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 784 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 919 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 914 B

File diff suppressed because it is too large Load diff