QuakeWiki
August 5, 2019

Forums

Welcome Guest

Pages: 1 2 3 4
Site Upgrade/Maintenance Log
OneMadGypsyPostAugust 29, 2018, 06:29
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

I noticed the link was done on Andy's Blog for QuakeWebTools so, I uploaded it to this server and added a link to it in Quake Galaxy >> extra. The Meats model viewer and Wad Studio were both based on Andy's work. I wound up rewriting a bunch of it but, none-the-less, his work inspired me and in some cases educated me. I'm unaware of anyone else hosting it so, I decided to host it. It is what it is, unfinished but still somewhat useful for quake asset viewing.

OneMadGypsyPostAugust 30, 2018, 02:50
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

Well, there is still a lot to do but, I got the guide fleshed out (mostly). Of course the colors are whatever. I am more concerned with getting everything to work than how it looks at this time. The black box in the menu is the currently selected "episode". The light gray bar means that I am hovering that row and the even lighter gray box means my pointer is on that box. Clicking anything in the guide brings up the image, title and description. You can scroll the guide with the mousewheel, touch or the little scrollbar that pops up when you are hovering the guide.

I wound up spending a couple of hours today completely changing how I am storing channels. Originally, I intended to make a custom post type and custom meta boxes so that the post title would be the title, the meta boxes would handle the video url and author, the post content would be the description and the featured image would be the "thumbnail". Since I am getting all of the data from youTube I don't need to do any of those things. So, I erased all the data that would create the custom post type and meta boxes, and wrote a new config for a custom admin page.

After all that, I decided that I don't want to tap youTube every time the player is visited so, I made it to where I can generate a fresh json file, whenever I want, by simply visiting my custom admin page and clicking save. This is better, it "costs" points or some shit every time I tap youTube and most channels only publish a new video once a week, or so. I can just go click save once a week, or so. I won't even come close to ever using all my "points" (or whatever the fuck they are) doing it this way.

I don't know what that little glitch in the image on the very left side of the guide is about. No such glitch exists in the interface.

[su_lightbox type="image" src="https://i0.wp.com/www.nextgenquake.com/wp-content/uploads/mediapress/members/1/5574/Untitled.png"]
Image
[/su_lightbox]

OneMadGypsyPostAugust 30, 2018, 06:51
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

Moving right along. There is still a bunch to do and this current theme is not my vision for the end result. I still need to :

1) add the logo
2) add a clock
3) add a "currently viewing" text
4) make it possible to independently move station rows left and right (hardest part left)
5) figure out a color scheme and restyle it accordingly
6) minor tweaks
7) regex parse links in descriptions and make them clickable
8) reconsider channel slugs (ie SMOD = "small mod compilation" but, it should probably be SMCV)
9) scour youtube for every quake everything and either include the playlist or compile my own and include it
10) allow a "more" on descriptions that blow out my 500 character limit
11) at the spot where all 3 elements meet in a 2 party corner and a 3rd party edge, make it draggable so sections can be resized
12) ummm... that might be it. I'll bang most of that out tomorrow.

[su_lightbox type="image src="https://i.imgur.com/MJ33cBf.png"]
Image
[/su_lightbox]
[su_lightbox type="image src="https://i.imgur.com/mZFgLkn.png"]
Image
[/su_lightbox]

OneMadGypsyPostAugust 30, 2018, 07:16
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

The funny thing about this is, in a way, it isn't running off of wordpress, at all. My custom page type is not calling a single wordpress function and has been completely stripped of all wordpress headers, footers, etc. The back end runs on wordpress but barely. I'm using wordpress stuff to create the admin page, and the admin page is sanitizing and serializing data via wordpress. It also stores video URL's and channel slugs in the options database but, all of that is doing nothing on the actual TV page. Like I said, clicking save takes the admin page data and rapes youTube for all the video data which is stored as a json file. The scripts wordpress runs to do this are all mine. Essentially, I built a wordpress plugin that, with very little work, wouldn't need wordpress, at all. LOL.

Shhhhh, dun tell nobody. I plan on putting this plugin in the wordpress plugin repository ... an unQuaked version.

OneMadGypsyPostAugust 31, 2018, 04:13
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

I'm goofing off with something for a minute. This isn't a real post. I'm testing posting of profile galleries.

[mpp-show-gallery id=5574]

I figured out how to post a gallery from your profile.

Image

Once you have that number
[mpp-show-gallery id=THE_NUMBER]

OneMadGypsyPostAugust 31, 2018, 07:25
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

[su_lightbox type="image" src="https://i.imgur.com/yulsc8z.png"]
Image
[/su_lightbox]

So, yesterday I had a list and here is what I did of it
1) add the logo ----- Logo SPOT is complete
2) add a clock ----- DONE
3) add a “currently viewing” text ---- DONT NEED IT
4) make it possible to independently move station rows left and right (hardest part left) ---- DONE
5) figure out a color scheme and restyle it accordingly --- need to do
6) minor tweaks ---- I did a lot of major tweaks and there are more to do
7) regex parse links in descriptions and make them clickable --- need to do
8) reconsider channel slugs (ie SMOD = “small mod compilation” but, it should probably be SMCV) ---- DONE
9) scour youtube for every quake everything and either include the playlist or compile my own and include it ---- need to do
10) allow a “more” on descriptions that blow out my 500 character limit ---- DONE did it differently
11) at the spot where all 3 elements meet in a 2 party corner and a 3rd party edge, make it draggable so sections can be resized --- need to do

I did a bunch of stuff that is not on this list
1) really smooth sliding transitions when you slide a channel list
2) also really smooth hilight transitions when you hover/unhover/click video listings
3) "smart" slider knows if you can go any further left or right
4) tons of size and color tweaks but, there will be plenty more before this is over
5) random video chosen on load (does not autoplay) and selected video listing slides into view
6) vmin and vmax - if you don't know what this is (and care), google it. I don't have the energy to explain it
7) my clock will never be wrong by more than .999 of a second. I could make it perfect but, it would be too much bullshit. I'm not trying to make clocks. I'm trying to make NGQ TV or QTube or ??ShamblerVision ... I haven't decided yet. At one point my Logo said DiewreqTV (lol).

Just for facts and stuff, about 50 hours ago, the above was this
Image

OneMadGypsyPostAugust 31, 2018, 10:16
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

[su_lightbox type="image" src="https://i.imgur.com/Bp7BugF.png"]Image[/su_lightbox]

made a "similar videos" widget. It's pulled randomly from the playlist of whatever video is currently selected and, it will never duplicate what is selected.

OneMadGypsyPostAugust 31, 2018, 23:25
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

[su_lightbox type="image" src="https://i.imgur.com/JVSfYw6.png"]
Image
[/su_lightbox]

I made links clickable in descriptions. I also did a code overhaul. My PHP for this page had a whole lot of echos to get the html on the page in a loop. I hate that. I made a couple of templates and used regex to replace tokens in the templates with the proper data. It's a lot cleaner. Also, my javascript was doing things that the PHP could do while it's creating the page. I hate javascript and want there to be as little javascript as possible. However, hate it or not, I decided to clean up that code as well by rewriting it as a class. This really does next to nothing in javascript except change the syntax for prototype but, whatever, I write classes. Having a bunch of distended functions running down a page is total crap IMO.

I'm about to go over all of the css and try to finalize it. The entire stylesheet is a total mess. I just wrote a whole lot of crap to make things happen and didn't try at all to maintain any organization. I also know that I have rules that have bogus properties in them, like floating an inline-block and stuff like that.

Once I finalize the stylesheet there isn't much left. I want to make a couple-few more controls and try to get some more "channels". Past that, ver 1 is basically done. From there it will be off to version 2 where I get a twitch API and start injecting it into this system. Then Vimeo. Then ?IDK. I'll probably work the ajax chat into the page and remove it for it's current location. If I do this, I am going to completely rewrite it. I didn't write the current chat plugin, I just modified it.

I have more ideas. QTube (or whatever it winds up being called) is far from complete. As far as I am concerned, at this stage, it is just the most basic implementation of what it can be. I'll be back later with more stuff ... maybe an announcement of a finished version 1.

OneMadGypsyPostSeptember 1, 2018, 06:57
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

[su_lightbox type="image" src="https://i.imgur.com/ORW7ueA.png"]
Image
[/su_lightbox]

Well, I know it doesn't look like it but, I have done a shit-load to this today. I tightened up all of the scripts and more or less finalized the style. I also made it scale-able.

[su_lightbox type="image" src="https://i.imgur.com/vFoa41Y.jpg"]
Image
[/su_lightbox]

lol, VERY scale-able. I know it is unusable at such a small size but, I don't really give a fuck. What you see right there is me showing just how bad-ass my CSS is. There are no tables, at all, in my entire app. Actually, it is the antithesis of a table layout because much of that is positioned absolutely. If you have the worlds sharpest stylus I guess you could more-or-less play with QTube on your smart-watch.

I have more features in the works. I am about to take the worlds shortest nap and start banging out the most important feature of all. What you see so far works perfectly. There is nothing more to do in a backwards direction. Now it's time to start piling more features on top. I could totally release this as-is right this minute but, I want this to be undeniably and unquestionably excellent. Right now, it is just pretty damn good. That whole thin bar in the center-ish of the display needs to be filled with features, and I already know what a bunch of them are going to be. I need some icons though. Kinda strange ones. For instance, where it says "current", if you click that it scrolls the currently selected video listing into view. I need an icon that expresses that. I can think of no icon that expresses that. I'm gonna have to make one up.

OneMadGypsyPostSeptember 2, 2018, 06:16
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

No visual spoilers today but, I wanted to document some of the things I did. I worked a lot on how the guide brings the currently selected listing into view, and how the guide works in general, really. It used to be that clicking the left or right slide buttons only moved the list by one item. That wasn't very helpful so, I made it so it slides to the first item that is greater than 80% of the guide width away from the listings current position. I used 80% instead of 100% because, quite often that last visible listing is partially shown. By getting the first one after 80% it tends to scroll the last listing to the beginning of the view.

It also used to be that when the guide scrolled the selected item into view it only did it on the X axis. This meant it might still be unseen if it was outside of the Y axis. I made it so it scrolls into view on both X and Y axis BUT, it only scrolls on the Y if the listing is not in view. I did it that way because I didn't want the guide always trying to scroll the Y to it's top-most position. If it's viewable on the Y there is no reason for the guide to move at all. Why go to all this trouble just to make the selected listing visible on demand (and actions)? Because it is pro-as-fuck and it could be helpful depending on what a user wants. For instance, what if you have shifted the guide around and lost your spot, the video you are watching has ended and you want the next one ... click. So "click" that no matter how buried it is "click" ... nothing else to do.

So, that was a lot of work and a lot of confusing math when dealing with the dumb-ass wayS that javascript deals with scroll, height and width. It was exacerbated by the fact I am using SimpleBar*, and figuring out what the hell to tap in SimpleBar to get some values that I could use was an absolute nightmare.

Another feature I added was the ability to turn on a playlist feature. Basically, you click the playlist control on and then when you select a video it plays the entire playlist starting from that video. I did this for a number of reasons:

1) youTube only lets me pool the last 50 videos of a playlist. By allowing playlist view, the built in playlist menu goes up to 200 videos.

2) without playlist view, every time a video ends you would have to select and start a new one. You still have to do that but, at least with playlist view the entire playlist will have to end before you make more selections.

I did more things but, I don't want to talk about them. Some things have to be left for you to explore and discover so it isn't like you already used it before it was even released. I think it's very obvious that this project is full steam ahead and will be released as version 1 soon. I'm an idea machine and I have more ideas that I want to complete before I am willing to release this.

*SimpleBar replaces the browser scrollbars with a nice clean (and simple) custom scrollbar. SimpleBar has been implemented in this project since day one and is also implemented on the chat box for this site.

OneMadGypsyPostSeptember 3, 2018, 21:07
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

Sorry about the double "captcha" when logging in. One of my plugins updated and added that on it's own. I found the setting and disabled it. Now we are back to just 1 "captcha".

-----------------------------------
I made the logo. Simple, clean and IMO video app looking.

I have been dumping more and more features into this app. The app is now smart enough that whether watching a video or a playlist it knows when videos have begun, ended or been paused. I could actually make my own controls for volume and everything but, the stock youTube player already has those controls. I am listening for these events for an entirely different reason.

I have another feature to my player that some of you may find nice. There is no suggested videos on video end, no overlay on video pause and no cookies. That's right, there are no cookies being stored by youtube, me or anyone else when watching videos on QTV. I'll be a pal and tell you how to do it. ANY youtube video or playlist can be made cookie-less by simply changing youtube.com to youtube-nocookie.com in an embed url. All embed url's in my player are concocted with the nocookie recipe.

------

edit: I can't believe that worked. That logo is not embedded as an image. It's a div with background image, color, size, position and repeat values set in a style tag. I did it that way cause the logo is kinda big and it has transparency. It would have looked weird if I just embedded it flat out. I wanted it to be more in it's own native environment and size. I could have just as easily put some style on an image tag but, I was curious if this forum would let me play with html and css in a more free-range way, and it does.

OneMadGypsyPostSeptember 5, 2018, 08:23
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

I decided to give y'all one more sneak peek cause, I'm about to dump a bunch more features in that I already have ready to go, I just haven't plugged them into the front end yet.

[su_lightbox type="image" src="https://i.imgur.com/JI8Z0aO.png"]
Image
[/su_lightbox]

[su_lightbox type="image" src="https://i.imgur.com/SZa7ks9.png"]
Image
[/su_lightbox]

From what you can see here, this is the current state of Qtv

1) Click any listing once to cue it, click it again to play it, click it again to pause it
2) The currently playing listing notifies you if the video is buffering/paused
3) Turning on playlist will load the playlist starting from whatever video you selected
4) Turning off playlist will still basically play as a playlist because, when the video is finished it starts playing the next one in the guide UNLESS you have cued another video then it will play that video. The same for playlist, if you cue a video before a video ends it will start a new playlist from the selected video
5) If you reach the end of a list it will randomly select a video and play from that video to the end of it's list where it will yet again select a random video ... repeats forever
6) clicking "show selection" (the eye) will scroll the currently playing video into view in the guide, unless that video is already scrolled into view, in which case it will scroll the cued video into view (if there is one). Clicking over and over will keep toggling between the currently playing and currently cued video
7) when a new video begins it automatically loads it's title and description to the right, as-well-as refreshes the "similar videos" list (the three inline pictures).
8) clicking a "similar videos" image scrolls it's guide listing into view
9) links in description are perfectly parsed and display as an @mainDomain but upon hover reveal a "tooltip" that displays the entire address
10) it is impossible to right-click or select anything. I didn't do this to hide anything or stop people from downloading images or anything. I did it because I would click things and sometimes they would get highlighted. I thought that seemed junky so I made everything non-selectable. As far as right-click goes, I accidentally right-clicked a couple of times and the context menu popped up (of course). I thought that looked junky, too so I turned that off, as well.
11) due to using SimpleBar there are no browser scrollbars and touch-screen devices can scroll by just finger dragging anywhere in the scrollable area
12) search is not implemented yet but, it will be soon
13) this post is the super rough draft of the help button text that isn't implemented yet but, will be soon.

There's a bunch of other features but, they are all pretty obvious actions. For instance, if you click a left or right channel slide button, it slides the channel listing left or right (respectively)

There are even more features that I haven't documented here which I am about to go plug into the front end.

OneMadGypsyPostSeptember 5, 2018, 16:14
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

It will be something that only lives on this site. This site needs more purpose. Quaddicted has maps locked down. Func has maps in a different way and engines. I'm starting with video but, I don't plan to stop at video. I have more ideas. Some of them are incredibly complicated. Actually, this one turned out to be pretty complicated. This is lightyears beyond what I initially set out to build. The thing is, once I started messing with one youTube API I found more youTube API's. By combining them I could make my own youTube bunny-hopped off of existing youTube. I sorta-kinda did. Granted, Qtv only serves Quake videos but, it doesn't have to. I could make Doom TV, Hexen TV ... anything you can imagine TV. All I need are playlists.

I just dumped a shit-load of functions on top of what I last posted. I'm pretty much covering all the things that aren't included in the youTube player. I want to tell you about them but, I'd much rather you see them when I release this. I want to say I will release this very soon but, every time I turn around I have more ideas. A lot of my ideas have come from testing this a whole lot and thinking "I wish I could 'X'" so, I make it to where we can 'X'. I'm at over 1000 lines of Javascript, About 300 lines of CSS, and technically thousandS of lines of PHP but, a lot of the PHP doesn't have shit to do with the player. I'm not sad I wrote it, though cause, I can spin the back-end of wordpress plugins really fast because of it.

As much as I am grateful to YouTube for releasing API's that let me have so much control, in the same breath, FUCK youTube. They lie. They say "or you can do it this way..." but, you really can't. I have fought with these API's left and right, rewriting half my code to do it the "other way" and other such stuff. I FINALLY have it to where I almost never get a CORS error in the console. It throws warnings every now and then but, everything still works so, I'm over it. I am POSITIVE that I am doing everything the most "successful" way. There is nothing left to change and no "other ways" left to try. Don't get me wrong, Qtv works VERY well. I just don't like seeing orange and I definitely don't like seeing pink in my console. I've pretty much eliminated the pink but every now and then there is some orange.

OneMadGypsyPostSeptember 6, 2018, 10:23
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

There are 2 things that are certain in this world.
1)I hate Javascript
2)Javascript hates me

All that being said, I just invented GypQuery. It's a super light-weight version of JQuery. I actually like JQuery but, my project doesn't need all the power that JQuery would add to it. I just wanted simple things that take the bloat out of my script. So, I spun my own version of "Jquery" that does only what I need.

For people that don't know about how crappy Javascript is or why I would go to the trouble to make a GypQuery, here is a brief example

//vanilla javascript
var node = document.querySelector('#mySelector');
node.setAttribute("alt", "myAltAttribute");

//GypQuery
$('#mySelector').attr("alt", "myAltAttribute");

-----------------------------------------------------------------

//vanilla javascript
var nodes = document.querySelectorAll('.mySelector');
nodes.forEach((item) => {
    item.addEventListener('click', function(e){
        //do things with e.target
    });
});

//GypQuery
_$('.mySelector').on('click', function(e){
    //do things with e.target
});

---------------------------------------------------------------

//vanilla javascript
var node = document.querySelector('#mySelector');
if(node.classList.contains('someClass'))
    node.classList.remove('someClass');

//GypQuery
$('#mySelector').rem('someClass');

As you can see, I have optimized the language (in a JQuery way). My lines are functionally identical to the vanilla javascript version. I'm not doing 2% of what JQuery can do but, I have get|set (text,attr,src,html,value) ~ add|has|remove (class) ~ on|off (event) all handled. on|off event works perfectly with single selectors or node lists with no syntax difference other than selecting like $() or _$().

Now to go rewrite all the javascript for Qtv to use GypQuery. It's only like 1000 lines...pbbbt

Here's a copy of GypQuery if anybody needed such a thing. It's semi minimized.

class GypQuery 
{   constructor(s){this.s=s;this.e=null;this.eH={
    events:[],
    sys:function(e,cb,i){
        this.unbind(e,i);
        i.addEventListener(e,cb,false);
        this.events.push({type:e,event:cb,target:i});},
    bind:function(e,cb,te){
        if(te.length>0)te.forEach((i)=>{this.sys(e,cb,i);});
        else this.sys(e,cb,te);},
    find:function(e,t){return this.events.filter(function(evt){return((evt.type===e)&&(evt.target===t));},e)[0];},
    unbind:function(e,te){
        var fe=this.find(e,te);
        if(fe!==undefined){te.removeEventListener(e,fe.event,false);}
        this.events=this.events.filter(function(evt){return((evt.type!==e)&&(evt.target!==te));},e);}
    };}
    get text(){return this.e.textContent;}
    get html(){return this.e.innerHTML;}
    get val(){return this.e.value;}
    get src(){return this.e.src;}
    set text(v){this.e.textContent=v;}
    set html(v){this.e.innerHTML=v;}
    set val(v){this.e.value=v;}
    set src(v){this.e.src=v;}
    has(c){return this.e.classList.contains(c);}
    add(c){if(!this.has(c))this.e.classList.add(c);}
    rem(c){if(this.has(c))this.e.classList.remove(c);}
    attr(n, v){if(v===undefined){return this.e.getAttribute(n);}else{this.e.setAttribute(n,v);}}
    sin(){this.e=document.querySelector(this.s);};
    mul(){this.e=document.querySelectorAll(this.s);};
    on(evt,cb){this.eH.bind(evt,cb,this.e);}
    off(evt){this.eH.unbind(evt,this.e);}
};
$ = function(s){var e=new GypQuery(s);e.sin();return e;}
_$ = function(s){var e=new GypQuery(s);e.mul();return e;}
OneMadGypsyPostSeptember 7, 2018, 02:29
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

It took all day but, I completely rewrote the entire thing (javascript-wise). "GypQuery" had little or nothing to do with the rewrite. I implemented most of GypQuery in like 10 minutes with find/replace-all commands. I went over every single line of code, all 941 of them, and completely reconsidered how everything worked. I got the code down to 659 lines and a bunch of things are happening much more efficiently.

At one point a while back I said that I turned everything into classes. Well, that had changed due to javascript having some really crazy scope when it comes to class members. for instance...


class someClass
{   constructor()
    {
        this.myThing = "something";
    }

    myFunc ()
    {
        setTimeout(function(){
            this.myThing = "something else";
	}, 1000);

        console.log(this.myThing); //"something"
    }
}

this.myThing inside of that setTimeout callback is NOT considered to be the original this.myThing cause "this" is now referring to the function. However making a callback in the class and dumping it's name in the callback does not solve the problem cause we are inside of "setTimeout" no matter what the fuck you do. This is why I absolutely hate this stupid fucking language. I know an ass-load of languages and this is THE ONLY FUCKING ONE that decides to completely change all the fucking rules.

Here's another doozey. In what fucking world does this possibility make any sense? NO OOP language would let you get away with this nonsense. Scope in javascript is all over the fucking place. Not to leave out that, if I wrote "function myFunc()" (like everyone and their grandma would expect it to be) or even better yet "private function myFunc()" ... it's an error. ::drops head::: I hate this fucking language. AS3 is lightyears more powerful, sensical and structured than this bullshit.

function outsideOfTheClass()
{    return "something else";
}

class someClass
{   constructor()
    {
        this.myThing = "something";
    }

    myFunc ()
    {
        this.myThing = outsideOfTheClass();

        console.log(this.myThing); //"something else"
    }
}

Anyway, back to what I was saying ... I fell away from classes cause they were slowing me down and giving me headaches. However, on this rewrite I classed about 70% of the script. The other 30% hates being in a class and I seriously don't care anymore. I totally should have just used jquery for all of this. I can live with JQuery and it's design. I didn't use it because I wanted to code every drop myself. I knew it would be a fight but, I'm not afraid of a fight. It's entirely possible that I did it this way to get in a fight. And I basically won that fight. All of my stuff works ... very nicely, and now its 300ish lines shorter and operates more efficiently. I only have 3 things left to do and I am going to finally release this.

I need to make the search feature, an ignore feature and write the help file ... that will be all, for now. I intend to finish all that tomorrow but it might take me 2 days.

I redesigned GypQuery too. It has everything I need and nothing more. I even took out the "off" because there isn't anything in my script that ever gets unbound from click events.

class GypQuery 
{   constructor(s){this.s=s;this.e=null;this.events=[];}
    sys(e,cb,t){t.addEventListener(e,cb,false);this.events.push({type:e,evt:cb,targ:t});}
    b(e,cb,t){if(t.length)t.forEach((i,n)=>{this.sys(e,cb,i);});else this.sys(e,cb,t);}
    on(e,cb){this.b(e,cb,this.e);}
    get text()          {return(this.e!=null)?this.e.textContent :null;}
    get html()          {return(this.e!=null)?this.e.innerHTML   :null;}
    get val()           {return(this.e!=null)?this.e.value       :null;}
    get src()           {return(this.e!=null)?this.e.src         :null;}
    get width()         {return(this.e!=null)?this.e.offsetWidth :null;}
    get height()        {return(this.e!=null)?this.e.offsetHeight:null;}
    get top()           {return(this.e!=null)?this.e.offsetTop   :null;}
    get left()          {return(this.e!=null)?this.e.offsetLeft  :null;}
    get scrollTop()     {return(this.e!=null)?this.e.scrollTop   :null;}
    get scrollLeft()    {return(this.e!=null)?this.e.scrollLeft  :null;}
    get length()        {return(this.e!=null)?this.e.length      :null;}
    get isNull()        {return(this.e==null);                         }
    set text(v)         {if(this.e!=null)this.e.textContent=v;         }
    set html(v)         {if(this.e!=null)this.e.innerHTML=v;           }
    set val(v)          {if(this.e!=null)this.e.value=v;               }
    set src(v)          {if(this.e!=null)this.e.src=v;                 }
    set width(v)        {if(this.e!=null)this.e.style.width=v+"px";    }
    set height(v)       {if(this.e!=null)this.e.style.height=v+"px";   }
    set top(v)          {if(this.e!=null)this.e.style.top=v+"px";      }
    set left(v)         {if(this.e!=null)this.e.style.left=v+"px";     }
    set scrollTop(v)    {if(this.e!=null)this.e.scrollTop=v;           }
    set scrollLeft(v)   {if(this.e!=null)this.e.scrollLeft=v;          }
    withAttr(a,v)       {if((this.e!=null)&&(this.e.length)){for(var i=0;i<this.e.length;i++){if(this.e[i].getAttribute(a) == v){return this.e[i];}}return null;}}
    has(c)              {return(this.e!=null)?this.e.classList.contains(c):false;}
    add(c)              {if((this.e!=null)&&(!this.has(c)))this.e.classList.add(c);}
    rem(c)              {if((this.e!=null)&&(this.has(c)))this.e.classList.remove(c);}
    attr(n, v)          {if(this.e!=null){if(v===undefined){return this.e.getAttribute(n);}else{this.e.setAttribute(n,v);}}}
    sin(){this.e=document.querySelector(this.s);}
    mul(){this.e=document.querySelectorAll(this.s);}
    cast(el){this.e=el;}
};
$   = function(s){var e=new GypQuery(s);e.sin();return e;       }/*query single*/
_$  = function(s){var e=new GypQuery(s);e.mul();return e;       }/*query all*/
$$  = function(el){var e=new GypQuery(null);e.cast(el);return e;}/*cast element*/


OneMadGypsyPostSeptember 8, 2018, 10:12
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

I did 3 things throughout yesterday til now but, they weren't the 3 things I said I was going to do. I did finish the docs, so that was one thing. I also set the stage for the search feature but, I had another idea and got sidetracked so, I'm not even counting that in these 3 things. I implemented that new idea so, now there is yet another feature in QTV, and it's one that I feel is pretty damn important. The third thing I did was work more on GypQuery.

One thing I hate about javascript is all the "this. this. this." about everything. I wanted to remove as much of that as I can from GypQuery. I was thinking about what I said the other day regarding the outside scope allowed in classes and the "inside scope" of functions. This gave me an idea and my idea turned out to be possible. I wrapped the entire GypQuery class in a function and declared constants in that function that represent the majority of "this." variables. By doing so, I don't need most of the "this." bullshit cause constants are constant (but only in the scope of the function, which is perfect). Once I got that to work I made a couple of other things constant to try and chop this down to as few characters as possible. I have a fully minimized version. It's just this version with every unnecessary space character removed. It clocks in at 2308 characters. It would be much much more than that without removing the "this." of it all.

After chopping it down as small as I can get it I added some more features that I realized I could use. I put "off" back in cause now I am removing event listeners from over 500 targets in a certain scenario. That scenario came about with my sidetrack idea that is now part of QTV. I also made some things "inlineable" and other things flexible.

for "inlineable" we have stuff like

$('#myThing').rem('thisClass').add('thatClass');

and for flexible we have stuff like

_$('.allTheCheckBoxes').uncheck(); //or check();

and

$('#justThisCheckBox').uncheck(); //or check();
let gq = function(el){
    const _t=true;const _f=false;if(el==null)el=_f;const e=el;const g=(el!=_f);const s=!el.length;const evt=new WeakMap();
    class GypQuery 
    {   constructor(el){(el==_f)?this.el=null:this.el=el;};
        sysb(ev,c,t){t.addEventListener(ev,c,_f);};
        sysub(ev,t){t.removeEventListener(ev,evt[ev],_f);};
        b(ev,c){if(!s)e.forEach((i)=>{this.sysb(ev,c,i);});else this.sysb(ev,c,e);evt[ev]=c};
        ub(ev){if(!s)e.forEach((i)=>{this.sysub(ev,i);});else this.sysub(ev,e);};
        on(ev,c){this.b(ev,c);return _t};
        off(ev){this.ub(ev);return _f};
        get isNull()     {return(!g);                      };
        get text()       {return(g&&s)?e.textContent :null;};
        get html()       {return(g&&s)?e.innerHTML   :null;};
        get val()        {return(g&&s)?e.value       :null;};
        get src()        {return(g&&s)?e.src         :null;};
        get width()      {return(g&&s)?e.offsetWidth :null;};
        get height()     {return(g&&s)?e.offsetHeight:null;};
        get top()        {return(g&&s)?e.offsetTop   :null;};
        get left()       {return(g&&s)?e.offsetLeft  :null;};
        get scrollTop()  {return(g&&s)?e.scrollTop   :null;};
        get scrollLeft() {return(g&&s)?e.scrollLeft  :null;};
        set text(v)      {if(g&&s)e.textContent=v;         };
        set html(v)      {if(g&&s)e.innerHTML=v;           };
        set val(v)       {if(g&&s)e.value=v;               };
        set src(v)       {if(g&&s)e.src=v;                 };
        set width(v)     {if(g&&s)e.style.width=v+"px";    };
        set height(v)    {if(g&&s)e.style.height=v+"px";   };
        set top(v)       {if(g&&s)e.style.top=v+"px";      };
        set left(v)      {if(g&&s)e.style.left=v+"px";     };
        set scrollTop(v) {if(g&&s)e.scrollTop=v;           };
        set scrollLeft(v){if(g&&s)e.scrollLeft=v;          };
        get length()     {return(g&&!s)?e.length     :null;};
        uncheck()        {if(g&&!s){for(var i=0;i<e.length;i++){e[i].checked=_f;}}else{e.checked=_f;};return this};
        check()          {if(g&&!s){for(var i=0;i<e.length;i++){e[i].checked=_t;}}else{e.checked=_t};return this};
        remAttr(a)       {if(g&&!s){for(var i=0;i<e.length;i++){e[i].removeAttribute(a);}}else{e.removeAttribute(a);};return this};
        withAttr(a,v)    {if(g&&!s){for(var i=0;i<e.length;i++){if(e[i].getAttribute(a) == v){return e[i];}}return null;}}
        has(c)           {return(g&&s)?e.classList.contains(c):_f;};
        add(c)           {if((g&&s)&&(!this.has(c)))e.classList.add(c);return this;};
        rem(c)           {if((g&&s)&&(this.has(c)))e.classList.remove(c);return this;};
        attr(n, v)       {if(g&&s){if(v===undefined){return e.getAttribute(n);}else{e.setAttribute(n,v);return this;}}};
    };
    return new GypQuery(e);
};
$   = function(s){return new gq(document.querySelector(s));}/*query single*/
_$  = function(s){return new gq(document.querySelectorAll(s))}/*query all*/
$$  = function(el){return new gq(el)}/*cast element*/

min

let gq=function(el){const _t=true;const _f=false;if(el==null)el=_f;const e=el;const g=(el!=_f);const s=!el.length;const evt=new WeakMap();class GypQuery{constructor(el){(el==_f)?this.el=null:this.el=el;};sysb(ev,c,t){t.addEventListener(ev,c,_f);};sysub(ev,t){t.removeEventListener(ev,evt[ev],_f);};b(ev,c){if(!s)e.forEach((i)=>{this.sysb(ev,c,i);});else this.sysb(ev,c,e);evt[ev]=c};ub(ev){if(!s)e.forEach((i)=>{this.sysub(ev,i);});else this.sysub(ev,e);};on(ev,c){this.b(ev,c);return _t};off(ev){this.ub(ev);return _f};get isNull(){return(!g);};get text(){return(g&&s)?e.textContent:null;};get html(){return(g&&s)?e.innerHTML:null;};get val(){return(g&&s)?e.value:null;};get src(){return(g&&s)?e.src:null;};get width(){return(g&&s)?e.offsetWidth:null;};get height(){return(g&&s)?e.offsetHeight:null;};get top(){return(g&&s)?e.offsetTop:null;};get left(){return(g&&s)?e.offsetLeft:null;};get scrollTop(){return(g&&s)?e.scrollTop:null;};get scrollLeft(){return(g&&s)?e.scrollLeft:null;};set text(v){if(g&&s)e.textContent=v;};set html(v){if(g&&s)e.innerHTML=v;};set val(v){if(g&&s)e.value=v;};set src(v){if(g&&s)e.src=v;};set width(v){if(g&&s)e.style.width=v+"px";};set height(v){if(g&&s)e.style.height=v+"px";};set top(v){if(g&&s)e.style.top=v+"px";};set left(v){if(g&&s)e.style.left=v+"px";};set scrollTop(v){if(g&&s)e.scrollTop=v;};set scrollLeft(v){if(g&&s)e.scrollLeft=v;};get length(){return(g&&!s)?e.length:null;};remAttr(a){if(g&&!s){for(var i=0;i<e.length;i++){e[i].removeAttribute(a);}}else{e.removeAttribute(a);};return this};uncheck(){if(g&&!s){for(var i=0;i<e.length;i++){e[i].checked=_f;}}else{e.checked=_f;};return this};check(){if(g&&!s){for(var i=0;i<e.length;i++){e[i].checked=_t;}}else{e.checked=_t;};return this};withAttr(a,v){if(g&&!s){for(var i=0;i<e.length;i++){if(e[i].getAttribute(a) == v){return e[i];}}return null;}};has(c){return(g&&s)?e.classList.contains(c):_f;};add(c){if((g&&s)&&(!this.has(c)))e.classList.add(c);return this;};rem(c){if((g&&s)&&(this.has(c)))e.classList.remove(c);return this;};attr(n,v){if(g&&s){if(v===undefined){return e.getAttribute(n);}else{e.setAttribute(n,v);return this;}}};};return new GypQuery(e);};$=function(s){return new gq(document.querySelector(s));};_$=function(s){return new gq(document.querySelectorAll(s))};$$=function(el){return new gq(el)};
OneMadGypsyPostSeptember 9, 2018, 12:44
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

I'm about halfway through redesigning a huge chunk of the interface. I just didn't like it. I liked some things and really didn't like other things. I don't want to release something that is "pretty good for version 1". I want to come out the box swinging hard ... real hard. The main problem is space management.

Let's look at one of my last images

Image

The area on the right is far too loose. There's all that room around the image for the selected video. The "similar videos" area is trying to be a square peg in a round hole. The video display is really loose around the edges. The guide takes up way too much of the bottom of the screen. The description has been a nightmare this entire time for a number of reasons.

1) Titles can take up up to 3 lines, forcing the description down an entire line more than the design accounts for. Truncating the title is an option but...
2) Some videos have a description that can't even be considered a sentence so, truncated titles or not, I end up with this huge blank piece of real estate. Some videos have no description at all forcing me to print "this video does not have a description"

The answer is simple "fuck descriptions" BUT not entirely. They just can't be part of the immediate layout. Titles need to be moved (and have been). So, no titles (at least not where they were) and no description in the immediately visible display. This creates a lot of room to shove the guide down and expand the video. I know, you might be thinking "Well, where do you put the title and description?". The title is simple, it goes in the control bar in the huge empty spot between the controls and the time. The description is a whole nother thing. My solution is to tab the right side of the screen. The immediate tab shows 4 images in a stylized manner. 1 image .... Here's a pic.

Image

That. Now that I am doing it this way though, other things need to change. The "search icon can go bye-bye because search can be incorporated into "catalogue". "catalogue" can actually be a whole bunch of things all in one. I have room for more tabs there, as well. I have no idea what I'm going to do with more tabs but, I would be willing to be that "catalogue" will eventually be split into 2 tabs...

Lots of things to do. I'm not even sure what half of them are but, I guarantee you they are going to get done.

OneMadGypsyPostSeptember 9, 2018, 12:51
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

You can do this now, too.
Image

I also made it to where all space after the end of the channel list has a semi-subtle dark static. I think It looks pretty cool. It's the small details that bring things to life.

OneMadGypsyPostSeptember 9, 2018, 15:19
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

Man, GypQuery is bad-ass! Check this out. The below is to add a listener to every tab so when it is clicked it removes "active" from the active tab and pane and adds "active" to the new tab and pane.

vanilla javascript

var nodes = document.querySelectorAll('.tab');
nodes.forEach((n)=>{
    n.addEventListener('click', function(e){
        if(e.target.classList.contains('active-tab')) return;
        var _node = document.querySelector('.active-tab');
        _node.classList.remove('active-tab');
        e.target.classList.add('active-tab');
        _node = document.querySelector('.active');
        _node.classList.remove('active');
        var id = e.getAttribute('id');
        var el = document.querySelector('#gyptv-'+id);
        el.classList.add('.active');
    });
});

IDENTICAL behavior with GypQuery

_$('.tab').on('click', function(e){
    var _e = $$(e.target);
    if(_e.has('.active-tab')) return;
    $('.active-tab').rem('active-tab');
    $('.active').rem('active');
    $('#gyptv-'+_e.add('active-tab').attr('id')).add('active');
});

14 lines, crushed down to 7 and there is not one iota of difference between these scripts functionally.

OneMadGypsyPostSeptember 10, 2018, 14:42
Moderator
Posts: 307
Registered:
November 12, 2017, 00:13
Very Hot topicReply To: Site Upgrade/Maintenance Log

Earlier last week I completely rewrote the Javascript for Qtv. Last night and most of today I completely rewrote the html and css, and tweaked the javascript to match the changes. I don't have to touch my PHP because, it is already really good. PHP is similar to AS3 in a lot of ways and I don't have any problems writing the code pretty solid the first time with PHP.

Anyway, at this point, I have flushed the entire codebase. My Javascript is the best I can do. I give myself about a 6, maybe a 7 for the Javascript. The HTML and CSS are solid as a rock. HTML ain't shit so, that's just whatever but, CSS3 has a lot of possibilities, rules and properties. I took all my CSS skills to the shop and studied like 22 pages from the Mozilla Developer Network before rewriting my CSS. I learned a lot. Some of it was a refresher course but, a lot of it was realizing I've been doing some things wrong for a long time.

I generally just write a bunch of CSS and if it looks good it is good. If I come across a stubborn element that doesn't seem to be responding I tend to just keep changing it's display type and other properties til it finally works. It really is just a lot of shooting in the dark til I hit something. My current CSS isn't like that at all. I knew exactly what I was doing when I rewrote it and I am very confident that it is spot on.

Anyway, everything is rewritten so, now it's just down to finishing up the stuff the new build is allowing for. If I showed you a picture you would just say "That's the exact same thing you showed in your last post." It isn't though. I've actually achieved the most recent design in a largely different way. Some things didn't change. The guide is identical to how it was before. Actually that's the only thing. The interface has been completely redesigned. The old interface was been held together by itself. Each thing was forcing the things around it to stay in place. The new interface doesn't work that way, at all. I could completely rip a chunk out of the interface and the only thing that will change is, that chunk will be gone. So, in a strange way, I guess you can say I removed all dependencies. That's a great thing to do.

Pages: 1 2 3 4
Page loaded in: 0.07 seconds.