Code Monkey home page Code Monkey logo

remote-preview's Introduction

Remote Preview

Remote Preview allows you to preview any URL on large number of mobile devices simultaneously. Just enter a URL, hit Enter, and the new URL gets automatically loaded on each device. Works on platforms like Android, Blackberry, iOS, Maemo, Meego, Symbian, Windows Phone and WebOS. Built by @ariel for the Helsinki Device Lab for fast site previewing. Watch a video on Youtube to see the tool in action.

Remote Preview works by making an ajax call every 1100ms to check if the url in the 'url.txt' file changed. If it did, the script will then change the src attribute of the iframe and load a new page into it. If there's no changes, the script will just keep polling the url.txt until something changes. Remote Preview allows very fast previewing of different URL's to check for possible layout problems, which can then be debugged using various other tools depending on the platform where they occur.

Basic usage

  1. Move all files to a public Dropbox folder/Server/localhost, edit ‘url.txt’, hit Cmd+S (save…) and wait for devices to refresh. That's all!
  2. Bookmark Remote Preview to your devices’s home screen for fast & easy application like access later on.
  3. If you moved all files to a server or localhost, you can control the devices via web browser by pointing your browser to the directory called /control/.
  4. To make the Controller page work, you need to make sure that PHP is enabled on the server and that the url file has necessary write permissions. You should also limit the access to this page somehow as otherwise anyone can go to that url and control the devices.
  5. Use ID's to scroll down to a certain point on a page. URL#ID, for example: http://opendevicelab.com/#location

Running on localhost

Check out this tutorial on how to config Apache for OS X 10.8.

Chrome extension

There's now an extension for Chrome, which, when turned on, auto sends every URL change to the controller (even the tab changes!). The extension is available via Chrome Web Store.

Browser support

Current version is tested to be working on at least following platforms:

  • Android OS 2.1 - 4.1.2 (Default browser + Chrome)
  • Blackberry OS 7.0 (Default browser)
  • iOS 4.2.1 - 6 (Default browser)
  • Mac OS X (Safari, Chrome, Firefox, Opera)
  • Maemo 5.0 (Default browser)
  • Meego 1.2 (Default browser)
  • Symbian 3 (Default browser)
  • Symbian Belle (Default browser)
  • WebOS 3.0.5 (Default browser)
  • Windows Phone 7.5 (Default browser)
  • Windows 7 (IE9)

Known issues

  • Pages open inside iframe
  • You have to write the url with http:// prefix
  • On Windows Phone 7.5 the iframe's src attribute can't be empty
  • On Android 4.0.4, when using Chrome browser, a fixed positioned element inside iframe seems to prevent the whole page's scrolling
  • On Android 2.1, when using default browser, the page stops auto updating after user scrolls down

License

Licensed under the MIT license.

Copyright (c) 2012-2023 Ariel Salminen, Ben Lane

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Changelog

v0.6 (2014-09-19) - Removes sandboxing.

v0.5 (2013-03-14) - Chrome extension added. Thanks to Ben Lane and e3 media.

v0.35 (2012-11-27) - Fixes few issues on the Controller page and adds better error messages. Also some refactoring to html/css/js/php. Thank you @Krinkle!

v0.31 (2012-11-19) - Adds file extension for the 'url' file which allows Remote Preview to work on ISS too. Thanks @stowball!

v0.3 (2012-11-14) - Adds controller which allows Remote Preview to be controlled via a web browser. Thank you @sherred and Device Lab Edinburgh!

v0.21 (2012-11-13) - Adds icon for touch devices.

v0.2 (2012-11-12) - Fixes some issues which where present in the initial release and makes Remote Preview a tad faster.

v0.1 (2012-11-8) - Release

Want to do a pull request?

Great! New ideas are more than welcome, but please check the Pull Request Guidelines first before doing so.

remote-preview's People

Contributors

arielsalminen avatar krinkle avatar sherred avatar tordans avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

remote-preview's Issues

Tutorial

It seems Dropbox does not provide public folders anymore from October 2012.

I very much would like to use this script/app but I am not exactly sure how to set this up.
Could you provide a step by step tutorial?

Dropbox only provides "Sharing" of links now, but at the end of such a sharing link is rather download or preview page of files, not your actual HTML file:

Screen Shot 2012-12-19 at 22 38 23

Screen Shot 2012-12-19 at 22 57 15

Where am I suppose do point my browser to afterwards, to the "Server" folder, "localhost" folder or index.html?

My folder structure is like this:

Dropbox

  • Server
  • - localhost
  • - - [all of your Remote-Preview files]

Thank you for any hints.

X-Frame-Options issue

Hello,
I found this error in console and after nothing works more.

Refused to display document because display forbidden by X-Frame-Options.

Can't get device to show remote preview. User Error Support

I'm having one of those days where nothing is working…anywhere.

MY Amazing Setup

Env.

Running MAMP pointed at my Sites directory
~/Sites/[awesome_project_directories]
~/Sites/remote-preview

Running With Chrome Extension

Preview Settings
http://127.0.0.1/remote-preview/control/update.php

pointing my device to…

http://127.0.0.1/remote-preview/

and using…

http://127.0.0.1/[my_awesome_project]/

from my browser…results in “Web page not available”

screen shot 2013-05-07 at 5 52 20 pm

Reload page

Awesome project—thanks! Is there any way that this tool can reload on the devices when the page is reloaded in Chrome? This is the only thing that would make a tool Adobe Edge Inspect redundant.

Support of dynamic URL - Chrome extension

The actual version cuts parameters since the second. URL like the following:
http://192.168.144.40:8080/pages/details/events.html?tid=53&search=&prevSearch=&startDate=08.01.2011&prevStartDate=13.01.2014&filter=&query=&content=%5B%5D&mandate=%5B%5D&page=1&rid=&code=&numero=&id_event=205

Gets cut to:
http://192.168.144.40:8080/pages/details/events.html?tid=53

To support all sort of URL we could change, line 56 of background.js, like this:
https://github.com/viljamis/Remote-Preview/blob/master/Chrome%20extension/source/background.js

var parameters = 'url=' + url;

To

var parameters = 'url=' + encodeURIComponent(url);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.