Point.im Scripts

Подкраска своих постов + автоклик непрочитанных + горячие клавиши

Stan na 09-08-2023. Zobacz najnowsza wersja.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Greasemonkey lub Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana jest instalacje jednego z następujących rozszerzeń: Tampermonkey, Violentmonkey.

Aby zainstalować ten skrypt, wymagana będzie instalacja rozszerzenia Tampermonkey lub Userscripts.

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

Aby zainstalować ten skrypt, musisz zainstalować rozszerzenie menedżera skryptów użytkownika.

(Mam już menedżera skryptów użytkownika, pozwól mi to zainstalować!)

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.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Będziesz musiał zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

Musisz zainstalować rozszerzenie menedżera stylów użytkownika, aby zainstalować ten styl.

(Mam już menedżera stylów użytkownika, pozwól mi to zainstalować!)

// ==UserScript==
// @name			Point.im Scripts
// @version			2023.08.09
// @description		Подкраска своих постов + автоклик непрочитанных + горячие клавиши
// @match			http*://*.point.im/*
// @icon			https://www.google.com/s2/favicons?domain=point.im
// @author			Rainbow-Spike
// @namespace       https://greasyfork.org/users/7568
// @homepage        https://greasyfork.org/ru/users/7568-dr-yukon
// @grant			none
// ==/UserScript==

var SelfPostMarker = 1,
	UnreadAutoClicker = 1,
	limit = 10,
	me = document . querySelector ( '#menu-profile' ),
		name = ( me != null ) ? me . href . replace ( /.*\/\/(.+)\.point\.im.*/i, "$1" ) : '-',
	link, comm;

if ( SelfPostMarker == 1 ) {
	document . querySelectorAll ( '#comments article.post' ) . forEach ( function ( e ) {
		link = ( e != null ) ? e . querySelector ( 'a' ) : '';
		comm = ( link != ( '' || null ) ) ? link . href . replace ( /.*\/\/(.+)\.point\.im.*/i, "$1" ) : '';
		e . style . cssText += ( comm == name ) ? 'border: 2px dashed #ccc; border-radius: 10px; margin: -1px -2px -1px -9px; padding: 4px 2px 4px 7px;' : '';
	} );
}

if (
	( UnreadAutoClicker == 1 ) &&
	( window . location . href . match ( 'point.im/recent/unread' ) != null ) &&
	( document . querySelector ( '.unread' ) . innerHTML * 1 > limit )
) document . querySelector ( '#older' ) . click ( );

document . querySelector ( '#header #new-post-label' )						. accessKey = 'w'; /* "Написать", акцесскей W */
document . querySelector ( '#new-post-wrap .buttons #new-post-hide-label' ) . accessKey = '0'; /* "Отмена", акцесскей 0 */
document . querySelector ( '#new-post-wrap .buttons input[type="submit"]' ) . accessKey = 's'; /* "Сохранить", акцесскей S */