npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

pagepeeker

v1.0.1

Published

the ulitiry to redisplay the web page of other user

Downloads

2

Readme

Pagepeeker

A node.js+express utility can redisplay the web page that was displayed by other user.

dependency

node.js express express-session

Installation

$ npm install pagepeeker

Usage

pagepeeker exposes two function; One of functions is the filter which can save the page contents of all sessions. The other of funcions is the router which can output the lived session list and the page contents which you want.

Example app.js:

var pagepeeker  =  require('pagepeeker'); 
 /*  "/seslist" is  the Page URL(PageURL).     */
app.use("/seslist", pagepeeker.seslist);
app.use(pagepeeker());

interface

You can access the Page URL(PageURL) to get the lived session list and the page contents.

the lived session list

The format of the list is JSON.
URL:  WebURL/PageURL
 

the page contents

URL:  WebURL/PageURL?sessionid=XXXXXXX

Example example.html:

<HTML>
<HEAD></HEAD>
<BODY>
    <script language='javascript'>
        function hpfresh(url) {
            parent.document.getElementById('hpcon').src = url;
        }
    </script>
    <ul>
        <script lanaguage="javascript">
            var http_request;
            try {
                // Opera 8.0+, Firefox, Chrome, Safari
                http_request = new XMLHttpRequest();
            } catch (e) {
                // Internet Explorer Browsers
                try {
                    http_request = new ActiveXObject("Msxml2.XMLHTTP");

                } catch (e) {

                    try {
                        http_request = new ActiveXObject("Microsoft.XMLHTTP");
                    } catch (e) {
                        // Something went wrong
                        alert("Your browser broke!");
                        
                    }

                }
            }
            http_request.onreadystatechange = function () {

                if (http_request.readyState == 4) {
                    // Javascript function JSON.parse to parse JSON data
                    var result = JSON.parse(http_request.responseText);

                    // jsonObj variable now contains the data structure and can
                    // be accessed as jsonObj.name and jsonObj.country.
                    for (var i = 0; i < result.length; i++) {
                        document.writeln("<li><a href=\"\" onclick=\"hpfresh('/seslist?sessionid=" + result[i].id
                            + "')\">" + result[i].id + "</a></li>");
                    }

                }
            }
            http_request.open("GET", "/seslist", true);
            http_request.send();
        </script>
    </ul>
</BODY>
</HTML>

Authors

  • Hongsheng Zhang

License

(The MIT License)