Giter VIP home page Giter VIP logo

instant-view's Introduction

Telegram instant views


What is it?

Instant View allows Telegram users to view articles from around the Web in a consistent way, with zero loading time. When you get a link to an article via Telegram, simply tap the Instant View button, and the page will open instantly.

For more visit this link Instant View Explained

Instant View Editor

Telegram's Instant View Editor allows you to create and test templates for any domain. To begin, just go to My Templates, type a target URL for your Instant View template into the box, and hit ‘enter’. This will open the editor. The source page will be displayed on the left.

Templates tutorial

When creating an Instant View template, you have four main objectives:

  • Instant View pages must only be generated for pages that need them.
  • All essential content from the source page must be represented.
  • All unnecessary elements must be eliminated from the Instant View page.
  • Your template must work well with any of the pages it covers.
  • Accordingly, one of the ways to create a template is to follow these steps:

Step 1. Aim your template

Instant View pages work best with relatively static articles. On the other hand, the main page of a news site that contains ever-changing lists of links to new articles would hardly benefit from the IV treatment.

For the first step, you will likely use conditions to clearly define which parts of the target website will and will not be covered by your template.

Step 2. Grab the essentials

Now it's time to do some real business. An Instant View page requires at least two properties to be created: a title and a body. Take a close look at the target article and make sure that all important elements are carried over to the IV page in a format supported by the Telegram apps.

At this stage, you may need to use functions to transform some elements before they are transferred. By the time you're done, your IV page should show the entire text of the article, along with all the headings and subheadings, quotes, cover and other photos, videos, and other kinds of embedded content from the source page.

Step 3. Remove the rest

Salvage the remaining useful bits, then use the @remove function to drop the rest. By now you should have a clean and slim IV page that displays the pure content and none of the fluff.

Step 4. Refine your template

At this stage, we advise you to leave the familiar confines of the page you were using for testing and check out different pages from your target website. See if any pages that don't deserve IVs are getting them — and whether IV pages are missing for any that do deserve them.

Also, check whether pages with irregular elements are processed correctly. Pay special attention to ensure that various types of media, embedded content, quotes, and separators are all displayed nicely. Check 5-10 different links and make the relevant adjustments.

For more visit this link Instant View Template tutorial

Publishing templates

If the Instant View page has been processed successfully, you'll see a View in Telegram button in the top right corner – you can use it to view the resulting page in-app.

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.