From 64fd713364194aea5042f53e25f0d58bdb328612 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 26 Jul 2024 02:30:42 -0500 Subject: [PATCH 1/9] Add .css --- constants.json | 1 + 1 file changed, 1 insertion(+) diff --git a/constants.json b/constants.json index 37a57ee..41e7601 100644 --- a/constants.json +++ b/constants.json @@ -335,6 +335,7 @@ { "words": [ "CSS", + ".css", "Neow", "The Defect" ], From 14a5a6607d38510894cc2e88c68b6481801e1adb Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 26 Jul 2024 02:53:19 -0500 Subject: [PATCH 2/9] Basic Ambience Page WIP --- static/ambience/index.html | 38 ++++++++++++++++++++++++++++++++++++++ static/ambience/main.js | 22 ++++++++++++++++++++++ static/ambience/style.css | 19 +++++++++++++++++++ 3 files changed, 79 insertions(+) create mode 100644 static/ambience/index.html create mode 100644 static/ambience/main.js create mode 100644 static/ambience/style.css diff --git a/static/ambience/index.html b/static/ambience/index.html new file mode 100644 index 0000000..f5feec9 --- /dev/null +++ b/static/ambience/index.html @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + Violet's Purgatory Ambient Page + + + + + + + + + + + {WEATHER_MODIFIER} +
+

00:00

+
+ {ACTIVITIES} +
+ + {SELECTED_VIDEO} +
+ + + \ No newline at end of file diff --git a/static/ambience/main.js b/static/ambience/main.js new file mode 100644 index 0000000..0f96eed --- /dev/null +++ b/static/ambience/main.js @@ -0,0 +1,22 @@ +function loop() { + var date = new Date() + + var hour = date.getHours(); + hour = (hour < 10 ? "0" : "") + hour; + + var min = date.getMinutes(); + min = (min < 10 ? "0" : "") + min; + + var sec = date.getSeconds(); + sec = (sec < 10 ? "0" : "") + sec; + + $("#time").text(hour + ":" + min) + + setTimeout(() => { + loop() + }, 1000) +} + +window.onload = () => { + loop() +} \ No newline at end of file diff --git a/static/ambience/style.css b/static/ambience/style.css new file mode 100644 index 0000000..cd4159a --- /dev/null +++ b/static/ambience/style.css @@ -0,0 +1,19 @@ +body { + background-image: none; + background-color: black; + display: flex; + align-items: center; + margin: auto; + +} + +@media screen and (min-height: 500px) { + html, + body { + height: 100%; + } +} + +#time { + font-size: 5rem; +} \ No newline at end of file From 1fadd74918aa99fd17726b322f36866641e9fb1e Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 26 Jul 2024 03:00:56 -0500 Subject: [PATCH 3/9] Add Fullscreening --- static/ambience/fullscreen.js | 28 ++++++++++++++++++++++++++++ static/ambience/index.html | 1 + static/ambience/main.js | 12 +++++++++++- 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 static/ambience/fullscreen.js diff --git a/static/ambience/fullscreen.js b/static/ambience/fullscreen.js new file mode 100644 index 0000000..de65877 --- /dev/null +++ b/static/ambience/fullscreen.js @@ -0,0 +1,28 @@ +/* + * jquery.fullscreen v0.6.0 + * https://github.com/private-face/jquery.fullscreen + * + * Copyright (c) 2012–2016 Vladimir Zhuravlev + * Released under the MIT license + * https://github.com/private-face/jquery.fullscreen/blob/master/LICENSE + * + * Date: 2016-08-25 + **/ +(function(global, factory) { + if (typeof define === 'function' && define.amd) { + // AMD + define(['jquery'], function (jQuery) { + return factory(jQuery); + }); + } else if (typeof exports === 'object') { + // CommonJS/Browserify + factory(require('jquery')); + } else { + // Global + factory(global.jQuery); + } +}(this, function($) { + +function defined(a){return"undefined"!=typeof a}function extend(a,b,c){var d=function(){};d.prototype=b.prototype,a.prototype=new d,a.prototype.constructor=a,b.prototype.constructor=b,a._super=b.prototype,c&&$.extend(a.prototype,c)}function native(a,b){var c;"string"==typeof a&&(b=a,a=document);for(var d=0;d37)&&defined(native("fullscreenElement"))&&(!defined(fsEnabled)||fsEnabled===!0),version=$.fn.jquery.split("."),JQ_LT_17=parseInt(version[0])<2&&parseInt(version[1])<7,FullScreenAbstract=function(){this.__options=null,this._fullScreenElement=null,this.__savedStyles={}};FullScreenAbstract.prototype={native:native,_DEFAULT_OPTIONS:{styles:{boxSizing:"border-box",MozBoxSizing:"border-box",WebkitBoxSizing:"border-box"},toggleClass:null},__documentOverflow:"",__htmlOverflow:"",_preventDocumentScroll:function(){this.__documentOverflow=document.body.style.overflow,this.__htmlOverflow=document.documentElement.style.overflow,$(this._fullScreenElement).is("body, html")||$("body, html").css("overflow","hidden")},_allowDocumentScroll:function(){document.body.style.overflow=this.__documentOverflow,document.documentElement.style.overflow=this.__htmlOverflow},_fullScreenChange:function(){this.__options&&(this.isFullScreen()?(this._preventDocumentScroll(),this._triggerEvents()):(this._allowDocumentScroll(),this._revertStyles(),this._triggerEvents(),this._fullScreenElement=null))},_fullScreenError:function(a){this.__options&&(this._revertStyles(),this._fullScreenElement=null,a&&$(document).trigger("fscreenerror",[a]))},_triggerEvents:function(){$(this._fullScreenElement).trigger(this.isFullScreen()?"fscreenopen":"fscreenclose"),$(document).trigger("fscreenchange",[this.isFullScreen(),this._fullScreenElement])},_saveAndApplyStyles:function(){var a=$(this._fullScreenElement);this.__savedStyles={};for(var b in this.__options.styles)this.__savedStyles[b]=this._fullScreenElement.style[b],this._fullScreenElement.style[b]=this.__options.styles[b];a.is("body")&&(document.documentElement.style.overflow=this.__options.styles.overflow),this.__options.toggleClass&&a.addClass(this.__options.toggleClass)},_revertStyles:function(){var a=$(this._fullScreenElement);for(var b in this.__options.styles)this._fullScreenElement.style[b]=this.__savedStyles[b];a.is("body")&&(document.documentElement.style.overflow=this.__savedStyles.overflow),this.__options.toggleClass&&a.removeClass(this.__options.toggleClass)},open:function(a,b){a!==this._fullScreenElement&&(this.isFullScreen()&&this.exit(),this._fullScreenElement=a,this.__options=$.extend(!0,{},this._DEFAULT_OPTIONS,b),this._saveAndApplyStyles())},exit:null,isFullScreen:null,isNativelySupported:function(){return IS_NATIVELY_SUPPORTED}};var FullScreenNative=function(){FullScreenNative._super.constructor.apply(this,arguments),this.exit=$.proxy(native("exitFullscreen"),document),this._DEFAULT_OPTIONS=$.extend(!0,{},this._DEFAULT_OPTIONS,{styles:{width:"100%",height:"100%"}}),$(document).bind(this._prefixedString("fullscreenchange")+" MSFullscreenChange",$.proxy(this._fullScreenChange,this)).bind(this._prefixedString("fullscreenerror")+" MSFullscreenError",$.proxy(this._fullScreenError,this))};extend(FullScreenNative,FullScreenAbstract,{VENDOR_PREFIXES:["","o","moz","webkit"],_prefixedString:function(a){return $.map(this.VENDOR_PREFIXES,function(b){return b+a}).join(" ")},open:function(a,b){FullScreenNative._super.open.apply(this,arguments);var c=native(a,"requestFullscreen");c.call(a)},exit:$.noop,isFullScreen:function(){return null!==native("fullscreenElement")},element:function(){return native("fullscreenElement")}});var FullScreenFallback=function(){FullScreenFallback._super.constructor.apply(this,arguments),this._DEFAULT_OPTIONS=$.extend({},this._DEFAULT_OPTIONS,{styles:{position:"fixed",zIndex:"2147483647",left:0,top:0,bottom:0,right:0}}),this.__delegateKeydownHandler()};extend(FullScreenFallback,FullScreenAbstract,{__isFullScreen:!1,__delegateKeydownHandler:function(){var a=$(document);a.delegate("*","keydown.fullscreen",$.proxy(this.__keydownHandler,this));var b=JQ_LT_17?a.data("events"):$._data(document).events,c=b.keydown;JQ_LT_17?b.live.unshift(b.live.pop()):c.splice(0,0,c.splice(c.delegateCount-1,1)[0])},__keydownHandler:function(a){return!this.isFullScreen()||27!==a.which||(this.exit(),!1)},_revertStyles:function(){FullScreenFallback._super._revertStyles.apply(this,arguments),this._fullScreenElement.offsetHeight},open:function(a){FullScreenFallback._super.open.apply(this,arguments),this.__isFullScreen=!0,this._fullScreenChange()},exit:function(){this.__isFullScreen&&(this.__isFullScreen=!1,this._fullScreenChange())},isFullScreen:function(){return this.__isFullScreen},element:function(){return this.__isFullScreen?this._fullScreenElement:null}}),$.fullscreen=IS_NATIVELY_SUPPORTED?new FullScreenNative:new FullScreenFallback,$.fn.fullscreen=function(a){var b=this[0];return a=$.extend({toggleClass:null,overflow:"hidden"},a),a.styles={overflow:a.overflow},delete a.overflow,b&&$.fullscreen.open(b,a),this}; +//# sourceMappingURL=jquery.fullscreen.min.js.mapreturn $.fullscreen; +})); \ No newline at end of file diff --git a/static/ambience/index.html b/static/ambience/index.html index f5feec9..22c6ed7 100644 --- a/static/ambience/index.html +++ b/static/ambience/index.html @@ -8,6 +8,7 @@ + diff --git a/static/ambience/main.js b/static/ambience/main.js index 0f96eed..80a249c 100644 --- a/static/ambience/main.js +++ b/static/ambience/main.js @@ -19,4 +19,14 @@ function loop() { window.onload = () => { loop() -} \ No newline at end of file +} + +$(document).on('keypress',function(e) { + if(e.which == 102) { + if ($.fullscreen.isFullScreen()) { + $.fullscreen.exit() + } else { + $("body").fullscreen() + } + } +}); \ No newline at end of file From cce0e075e62d0f6f38a11f81432b44bf7d8ecf94 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 26 Jul 2024 03:01:52 -0500 Subject: [PATCH 4/9] Remove Video --- static/ambience/index.html | 2 -- 1 file changed, 2 deletions(-) diff --git a/static/ambience/index.html b/static/ambience/index.html index 22c6ed7..2da6e43 100644 --- a/static/ambience/index.html +++ b/static/ambience/index.html @@ -31,8 +31,6 @@
{ACTIVITIES}
- - {SELECTED_VIDEO} From d379475b45f5ea6735d1ed2be2945caf54927faa Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Fri, 26 Jul 2024 03:16:39 -0500 Subject: [PATCH 5/9] Fix page not working --- static/ambience/{main.js => ambient.js} | 4 ++-- static/ambience/index.html | 2 +- static/main.js | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) rename static/ambience/{main.js => ambient.js} (90%) diff --git a/static/ambience/main.js b/static/ambience/ambient.js similarity index 90% rename from static/ambience/main.js rename to static/ambience/ambient.js index 80a249c..3f8e12c 100644 --- a/static/ambience/main.js +++ b/static/ambience/ambient.js @@ -17,9 +17,9 @@ function loop() { }, 1000) } -window.onload = () => { +document.addEventListener("DOMContentLoaded", function() { loop() -} +}) $(document).on('keypress',function(e) { if(e.which == 102) { diff --git a/static/ambience/index.html b/static/ambience/index.html index 2da6e43..2b58283 100644 --- a/static/ambience/index.html +++ b/static/ambience/index.html @@ -9,7 +9,7 @@ - + diff --git a/static/main.js b/static/main.js index 5c50bc3..72b0841 100644 --- a/static/main.js +++ b/static/main.js @@ -154,7 +154,7 @@ window.onbeforeunload = function () { window.scrollTo(0, 0); } -window.onload = function () { +document.addEventListener("DOMContentLoaded", function() { $("#jsEnabled").text("true") pfp = $(".pfp") @@ -191,7 +191,7 @@ window.onload = function () { } } socketeer() -} +}) var lastPong = Date.now() From cefb365f66c829c4261c63fbdc5baa34ad837097 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 8 Aug 2024 10:09:21 -0500 Subject: [PATCH 6/9] Fix items with no URL in socials --- pageUpdater.js | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/pageUpdater.js b/pageUpdater.js index 9c707af..ff821d5 100644 --- a/pageUpdater.js +++ b/pageUpdater.js @@ -51,6 +51,14 @@ function firstToUpper(str) { return str.charAt(0).toUpperCase() + str.slice(1) } +function onlyIfExists(string, check) { + if (check) { + return string + } else { + return "" + } +} + function makeHtmlSafe(str) { return String(str).replace(/&/g, '&').replace(//g, '>').replace(/"/g, '"'); } @@ -299,9 +307,8 @@ function converter(html, dynamic = true) { for (var x = 0; x < sitesTable.length; x++) { var siteName = sitesTable[x] var siteData = sites[siteName] - if (siteData.url) { - html += `${siteName}: ${siteData.name.replaceAll("Violet", "{Violet}")}` - } + html += `${siteName}: ${siteData.name.replaceAll("Violet", "{Violet}")}` + } html += "" } From bd0e3900dd80e446232afe1977ce40198aa41861 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 8 Aug 2024 18:54:00 -0500 Subject: [PATCH 7/9] Test From 439cfec97ba2d13584b0526385e5bdc7b5a42ea0 Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 8 Aug 2024 19:07:39 -0500 Subject: [PATCH 8/9] Test From d7dccca8102d94b21bfdd4ed7e292105762f6f7e Mon Sep 17 00:00:00 2001 From: bingus_violet Date: Thu, 8 Aug 2024 19:08:39 -0500 Subject: [PATCH 9/9] Test commit again --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2cc0069..e8629f8 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ These highlighted words ARE case senstive. You can make them not case sensitive Highlighted words will automatically highlight adjacent letters. So, for example, `NodeJS-generated` will all be highlighted green, as `NodeJS` is a keyword. If a highlighted word finds adjacent paranthesis, then the entire parenthesis will be highlighted. -For example `(Godot Engine is super cool)` will all be highlighted blue. So will `(My favorite utoid is Teto)`. But, on the other hand, `(Don't you think Javascript sucks?)` will only have `Javascript` highlighted. +For example `(Godot Engine is super cool)` will all be highlighted blue. So will `(My favorite UTAUloid is Teto)`. But, on the other hand, `(Don't you think Javascript sucks?)` will only have `Javascript` highlighted. ### Dynamic HTML In `pageUpdater.js`, is a dictionary that specifies keywords to look for. Then, if it finds those keywords, and replaces them with HTML.