[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]

/prog/ - Programming

Programming board

Catalog

See 8chan's new software in development (discuss) (help out)
Infinity Next update (Jan 4 2016)
Name
Email
Subject
Comment *
File
* = required field[▶ Show post options & limits]
Confused? See the FAQ.
Embed
(replaces files and can be used instead)
Options
Password (For file and post deletion.)

Allowed file types:jpg, jpeg, gif, png, webm, mp4, pdf
Max filesize is 8 MB.
Max image dimensions are 10000 x 10000.
You may upload 1 per post.


File: 1452310435251.png (145.99 KB, 1920x1125, 128:75, based.png)

235455 No.3833

Guys, I had this script which enabled me to make my computer write whatever I chose, using Chrome. It no longer works. Why? and how to fix it?

I'll copypasta the script in the thread.

235455 No.3834

Here's the post from the anon who taught me how to do this:

in google chrome do this:

1. press ctrl-shift-j

2. paste this script, DO NOT FUCKING HIT ENTER YET

(function() {

var text = prompt("Enter some text.");

var width = $(".active-cursor").width();

var height = $(".active-cursor").height();

var start = $(".active-cursor").offset();

var current = {

top: Math.round(start.top + height / 2),

left: Math.round(start.left + width / 2)

};

var i = 0;

function next() {

var c = text.charAt(i);

if (c === "\n") {

current.left = start.left;

current.top += height;

} else {

$(document.elementFromPoint(current.left, current.top)).click();

w.typeChar(c);

current.left += width;

}

i++;

if (i < text.length) {

setTimeout(next, 10);

}

}

next()

})();

3. copy the ascii you want to post

4. press enter, a prompt will come up, paste your ascii into the prompt

5. profit!

for repeat pastes you only need to go to the java console and press the up arrrow, it will recall the last script you used even if you have closed chrome and opened it again

if you don't have chrome well…why the fuck not faggot?

———————————–

Can you tell me what I need to fix?


1c6818 No.3838

>>3834

What is the error message you are getting in the javascript console?

I'm getting a TypeError: cannot read property 'top' of undefined.

That 'undefined' is start.

$('.active-cursor').offset() returns undefined when I try to run your script




[Return][Go to top][Catalog][Post a Reply]
Delete Post [ ]
[]
[ home / board list / faq / random / create / bans / search / manage / irc ] [ ]