Giter VIP home page Giter VIP logo

Comments (3)

boomcruiser avatar boomcruiser commented on July 23, 2024

For the record, i tried addingresponse.write("<div id='unique' style='position:absolute;height:60px;width:40px;'><input type='text'></input><button>Go</button></div>"); at https://github.com/nfriedly/node-unblocker/blob/master/lib/proxy.js#L123 and https://github.com/nfriedly/node-unblocker/blob/master/app.js#L162
It did add the Input and Button elements but it messed with the page pretty bad ;\ Is there any way to do this ?
Below is the screenshot of what appears

image

from node-unblocker.

nfriedly avatar nfriedly commented on July 23, 2024

Yea, response.write will mess things up if you use it like that. Take a look at https://github.com/nfriedly/node-unblocker/blob/master/lib/metarobotsstream.js - you want to do something pretty similar to that, only instead of </head>, you want </body>. (Note that </head> appears in that file twice.)

And then you would include your new file in the proxy by require()'ing it around https://github.com/nfriedly/node-unblocker/blob/master/lib/proxy.js#L11 and piping thorough it just like with the metarobotsstream around https://github.com/nfriedly/node-unblocker/blob/master/lib/proxy.js#L138 and https://github.com/nfriedly/node-unblocker/blob/master/lib/proxy.js#L142

I have some plans for making this a little easier to extend at some point in the future, but I'm not sure when I'll get to it.

(Also, the reason I never added a form is because you can just edit the URL in the Address Bar pretty easily most of the time.)

from node-unblocker.

boomcruiser avatar boomcruiser commented on July 23, 2024

Gee thanks a lot!That worked like a charm

from node-unblocker.

Related Issues (20)

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.