[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]

/prog/ - Programming

Programming
Name
Email
Subject
REC
STOP
Comment *
File
Password (Randomized for file and post deletion; you may also set your own.)
Archive
* = required field[▶Show post options & limits]
Confused? See the FAQ.
Options

Allowed file types:jpg, jpeg, gif, png, webp,webm, mp4, mov
Max filesize is16 MB.
Max image dimensions are15000 x15000.
You may upload5 per post.


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

6aff7f 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.

____________________________
Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6aff7f 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?

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.

6aff7f 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

Disclaimer: this post and the subject matter and contents thereof - text, media, or otherwise - do not necessarily reflect the views of the 8kun administration.



[Return][Go to top][Catalog][Nerve Center][Random][Post a Reply]
Delete Post [ ]
[]
[ / / / / / / / / / / / / / ] [ dir / random / 93 / biohzrd / hkacade / hkpnd / tct / utd / uy / yebalnia ]