K
K
KPA_992014-02-22 22:50:11
JavaScript
KPA_99, 2014-02-22 22:50:11

Javascript for Greasemonkey: how on page load "send a message" to the user?

It is necessary to make sure that when loading the page "send a message" to the user (site kinozal.tv), by default, the item "Save in sent" is ALWAYS checked . (see picture below).
The latest Firefox browser (v27.0.1) is being used.
3ffac3cdfa659072d59d658ec6db2d1e.png

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Sokolov, 2014-02-22
@sergiks

// ==UserScript==
// @name        Always__On
// @namespace   Kinozal
// @description Авто-включить "Сохранить в отправленных"
// @include     http://kinozal.tv/sendmessage.php*
// @version     1
// @grant       none
// ==/UserScript==
document.getElementById('save').checked="checked";

K
KPA_99, 2014-02-23
@KPA_99

Thanks for the answers:
1) Yuri Lobanov: @iiil (I don't know who deleted his answer),
2) and Sergey Sokolov: @sergiks

// ==UserScript==
// @name        Always_On
// @namespace   Kinozal
// @description Кинозал_сообщение "Сохранить в отправленных"
// @include     http://kinozal.tv/sendmessage.php*
// @version     1
// @grant       none
// ==/UserScript==
document.getElementById('save').checked="checked";
document.getElementById('delete').checked="";

The penultimate line PUTs a daw on "Save in sent"
And the last line REMOVES a daw in "Delete after answer" .
(PS Perhaps something in the last line is incorrect, but WORKS).

Y
Yuri Lobanov, 2014-02-23
@iiil

I deleted the answer myself, because I completely missed Greasemonkey in the question and wrote you html checked and a second example in jq :)
Try checked=true and checked=false

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question