JavaScript/jQuery google style website preview - javascript

I remember following a like off of here a little while ago for something called shark.js or sharpe.js (but I might be wrong on the name). I've tried googling it, looking through here, my browser history and I have had no luck. It wasn't wkhtmltopdf, I know that much. Does anybody know what it might be called or what I am talking about? Have you got a link to it please?

Stack overflow Question: jQuery Webpage Preview
From the second answer:
http://craigsworks.com/projects/qtip/demos/content/thumbnail
That should be what your looking for, don't know if it's the exact same thing, but same functionality.

Not sure how this can be done in client side javascript in real-time. However, I bet Google uses a server-side process to capture a screenshot and then uses javascript to request an image to display to the client.

Related

How to bypass JavaScript detection when using requests in Python?

So there is a problem with JavaScript and requests (in Python) and that is, it does not use JavaScript when requesting a webpage.
The website I'm working with (https://access.paylocity.com/) requires JavaScript and without it, it changes the content of the page to just a text at the top saying, "Please enable JavaScript to view the page content."
(I could be wrong here but) I think one solution is the use of Selenium, but that would replace requests which I'm fine with as long as there are no other ways of fixing/bypassing this JavaScript detection.
(For those wondering, this python project of mine is supposed to automatically fetch the events on the Paylocity calendar, then port those events to another calendar that I frequently use everyday. It's also just intended for myself.)
Edit: Here is the code I have if that will help https://pastecode.io/s/GXTUO1BgtR (I didn't know where to paste my code, so I decided on that website. If I should change it, please comment or say something about it.)
Since the website you're working with is dynamically loading the JS as far I can tell, I think you have no other choice as to making use of Selenium. I had a project on my own a couple weeks ago and run into a similar problem which I could also solve using Selenium. But, I'm no expert, I'm just giving away my thoughts on this.

JavaScript Hidden iFrame comet

I need to implement comet, preferably with the hidden "forever iFrame" technique using PHP to instantly update a file on the server and get data from that file (and then JavaScript would use that data to manipulate the webpage). I have been searching for a detailed example for how to do something like this. Much of what I have found I do not understand or I think is not applicable. I am not fluent in PHP, yet.
If anyone knows or knows how to find a detailed example of this or could make one, I would be much obliged.
I'm sure this is close to what you want:
http://code.jenseng.com/jenChat/
The guy even mocks the technique as preposterously outdated, but it's exactly what you need. Be warned, as I seem to remember, there's a little bug in the actual code which stops it from working out the box, like some erroneous filehandle.
Get back to me here if you can't spot it. I can assure you the code works perfectly once the error is spotted. I think it's in chat.php, I'm checking.

How protect this link?

I want to hide HTML Code from source code, how this is possible?
For example:
jwplayer("mediaplayer").setup({
file: "http://example.com/Media.m3u8",
autostart: 'true',
controlbar: 'bottom',
file: "http://example.com/Media.m3u8", How can I hide the code?
You can't hide it, the best you could do is make it a little harder to figure it out. And this is just obscuring, it is NOT securing.
For the server side portion, you could change:
file: "http://example.com/Media.m3u8",
to
file: window.atob('<?php echo base64_encode("http://example.com/Media.m3u8");?>'),
and then the output will be:
file: window.atob('aHR0cDovL2V4YW1wbGUuY29tL01lZGlhLm0zdTg='),
Just know, this won't stop anyone who really wants to figure it out. It will only stop someone who doesn't know anything about programming and is too lazy to spend five minutes on it.
You can't. It has to be sent to the browser in order to be executed/viewed/played, and the user can always copy it.
You can not handle it, but on the other side, that the link you provided, you can manage the authentication
If your question is how to protect the link, you can use some server side code to generate a one time usable link generated each time the page is loaded that only allows access to that file one time. once that use is up the URL is now useless. But even this is able to be bypassed.
It is not possible to totally hide something. At the end of the day, if people want to take your content badly enough, they will figure out a way to do so.
However, if you want to use HLS AES encryption, or secure streaming via RTMPE, that will help. The JW Player supports both of these. Then you can also use some tools to encode/encrypt/obfuscate your code, however, people with any technical know how can easily decode/decrypt/deobfuscate this with other tools, or simply by using Firebug/Chrome developer tools. It will make it harder for some of your audience to take your videos, though, but not all. But people will still be able to figure out a way to do this if they want your content badly enough, they will even use screen recorders as a last resort. One other thing you should do is encode your videos with your own watermark if you are concerned about people screen recording your videos.
My idea would be to look into only allowing your site (domain name) to download it and encoding the link.

Display Comic Book files on a webpage?

I'm thinking about creating a webpage and I'm trying to brainstorm some ways to display them in the page.
If i wanted to get dirty and create everything myself, i think i could do it with html5, CSS3, and javascript/jquery. Just do some kind of page buttons with an image tag and maybe get into some more detailed stuff as it comes up (i dont know how i would do zooming and multiple pages).
But wahat i really want to know is if there is already some way to do this? I've looked around for a bit and cant seem to find any sort of plugin that would read a cbz file or display an set of images with the 'e-reader' type of tools in mind. Just wondering if anyone knows of anything?
Thanks
I used to use an online reader for a long time so I started an experiment to build one myself a while back: netcomix
It's open source so you can see if you find anything appealing in what I did. I figured I'd do all the real UI work client side with HTML, CSS, and JavaScript and the server was strictly responsible for acting as a service (for example, to supply a list of comics or a list of all the pages in a particular issue) and serving up the individual JPG/PNG/GIF files. That compartmentalized things nicely and I was very pleased with how jQuery BBQ gave me a history that I could back through even though I stayed on one page the whole time.
Now if I were to do the same experiment again, I'd use Backbone.js to give some structure to the client side and obviously it needs a lot of love because the server side really does nothing at the moment. Early versions were strictly hard coded although I started putting in some simple SQL stuff in there in the latest version. It's nothing more than an experiment though and should be treated as such. It's there for ideas and little else. If you find it interesting and want some more ideas contact me and I'll be happy to let you know all my wacky ideas for such a program.
I know this is an old question. But web technologies have gotten better in the last few years. There are several comic book readers that can work in the browser using pure HTML and JavaScript. I wrote one called: http://comic-book-reader.com .
If you want to see a very simple example of how to read CBR and CBZ files in the browser. You should check out http://workhorsy.github.io/uncompress.js/examples/simple/index.html which uses the JavaScript library https://github.com/workhorsy/uncompress.js

Embedding C/C++ code with syntaxhighlighting into HTML with javascript

Hopefully somebody can point me to something that could help. What I'm doing is designing a few things in a HTML document, but I'd really like to be able to have blocks of C/C++ (not too worried, although I imagine C would be easier) code in the design document. The problem I have is formatting the code - as I'd ideally like syntax highlighting.
I know the above is very possible - many sites that allow code to be entered do this, but what I'm wanting is for this to be possibly done in javascript so that everything can be contained nicely in a html file that can just be browsed and edited locally with no hassle for running an (albeit probably a simple) web server. I don't suppose anybody knows of such a javascript tool that can do this?
Thanks very much. :)
Edit: Remarkable - I've spent the past 1 1/2 hours looking for something like this and the next search I make after writing this question gets me this! I shall leave this question open a little to give others a chance to post so that if the above doesn't suit somebody, then perhaps another solution will.
Time to close. Here's a few javascript syntax highlighters:
SyntaxHighlighter
A collection of 9 scripts

Categories

Resources