VozResponsive

Help You Surf VozForums in limited-width window

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey, το Greasemonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Violentmonkey για να εγκαταστήσετε αυτόν τον κώδικα.

θα χρειαστεί να εγκαταστήσετε μια επέκταση όπως το Tampermonkey ή το Userscripts για να εγκαταστήσετε αυτόν τον κώδικα.

You will need to install an extension such as Tampermonkey to install this script.

Θα χρειαστεί να εγκαταστήσετε μια επέκταση διαχείρισης κώδικα χρήστη για να εγκαταστήσετε αυτόν τον κώδικα.

(Έχω ήδη έναν διαχειριστή κώδικα χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install an extension such as Stylus to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

You will need to install a user style manager extension to install this style.

(Έχω ήδη έναν διαχειριστή στυλ χρήστη, επιτρέψτε μου να τον εγκαταστήσω!)

// ==UserScript==
// @name VozResponsive
// @description Help You Surf VozForums in limited-width window
// @grant none
// @include *://*vozforums.com/showthread.php?t=*
// @version 0.0.1.20150827132010
// @namespace https://greasyfork.org/users/14513
// ==/UserScript==

posts = [].slice.call(document.querySelectorAll('[id^=post_message_]'));
bg = [].slice.call(document.querySelectorAll('table[id^=post]'));
function changeWidth(e,size){
	e.style.width = size;
	e.style.marginLeft = "0px";
}
function recalc(){
bg.forEach(function(b){
	changeWidth(b,"95vw");
});
posts.forEach(function(post,index,array){
	changeWidth(post,"88vw");
	//sig
	sigComment = post.nextSibling.nextSibling.nextSibling.nextSibling;
	//sig for first post
	if(index == 0){
	sigComment = sigComment.nextSibling.nextSibling.nextSibling.nextSibling;
	}
	if(sigComment.data ==  " sig "){
		sigNode = sigComment.nextElementSibling;
		changeWidth(sigNode,"88vw");
	}
});
}
//For Chrome,Safari
window.addEventListener("resize",recalc);
//onload
recalc();