Public feed #726697

Miscellany

public javascript v1 · immutable
Raw Edit
·published 2007-10-05 13:01 UTC
rendered paste body
// ==UserScript==// @name Add Subscription// @author Martin Jonáš  <info@matajon.net>// @include http://forum.thesims2.cz/posting.php?mode=reply*// @include http://forum.thesims2.cz/posting.php?mode=newtopic*// @include http://forum.thesims2.cz/posting.php?mode=quote*// ==/UserScript==window.addEventListener('DOMContentLoaded', function() {  var textArea = document.getElementsByTagName('textarea')[0];  var position = 0;  if (textArea.value.length > 0)  {    position = textArea.value.length + 2;  }    var podpis = "\n\n____________\n Podpis :)";    textArea.value += podpis;  textArea.focus();  textArea.setSelectionRange(position, position);}, false);