Skip to content

Show highlighted HTML source of the current web page using PHP and JavaScript.

License

Notifications You must be signed in to change notification settings

daemondevin/Show-HTML-Source-Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Show HTML Source Code

Show HTML Source Code (a.k.a. middleFinger)

This class can show highlighted HTML source of the current web page.

It can generate highlighted HTML source code using PHP form the current page. It calls a script that will use the PHP class to retrieve the page HTML source and output it in a user-friendly fashion on the end-users web browser using JavaScript.

This project also includes a replacement context menu (right click). This context menu also supports keyboard shortcuts using JavaScript keyboard event triggers.

Features

The following is a list of features this project comes packaged with.

  • CSS style-sheets for easy customization.
  • A replacement context menu to replace the browser's default right click menu.
  • Context menu comes with optional sub menus for better organization.
  • Keyboard shortcuts. (e.g. Ctrl + U; View Source, BKSP; go back to the previous web page)
  • An example page (index.htm) for an easy quick-start.
  • The output source code is also generated with line numbers.

Keyboard Shortcuts

Key Keyboard Shortcuts Keyboard Event Description
Backspace Bksp or Alt + < Goes back one page in the browser history.
Shift + Backspace Shift + Bksp or Alt + > Goes forward one page in the browser history.
F5 F5 or Ctrl + R Refreshes the current page.
Control + P Ctrl + P Opens the Print Page dialogue screen.
Control + U Ctrl + U Views the source code of the current page.
Control + X Ctrl + X Closes the source code window element.
Home Home Scrolls to the top of the page.
End End Jumps to the bottom of the page.
ArrowUp Up Arrow Scrolls the page up a little bit.
ArrowDown Down Arrow Scrolls the page down a little bit.
PageUp PgUp Scrolls the page up a lot more.
PageDown PgDn Scrolls the page down a lot more.
ContextMenu Context Menu Opens and/or closes the context menu element.
Escape Esc Closes the context menu element if it's visible.

Demo Content

The following is a list of demo content for your viewing pleasure. This way you can see what this package has before you download it.

Screenshots

Context Menu (Right Click) Screenshot:

Screenshot #1

Generated Source Code Output Screenshot:

Screenshot #2

System Requirements

  • PHP 5+ on UNIX, Mac OS X, or Windows with Apache server (or something similar).
  • Some CSS and HTML knowledge required for customizing.
  • PHP and JavaScript knowledge required for advance customization.

Awards

The following is a few awards or acknowledgements this project has won.

"Often Web developers want to take a look at Web pages source code but usually browsers show it in a way that it is hard to read. This class provides means to show the current page source code by highlighting the tags and data."

-Manuel Lemos (PHPClasses.org Founder/Webmaster)

License

  • This project and the code therein is released under the GNU GPL-3.0.

About

Show highlighted HTML source of the current web page using PHP and JavaScript.

Resources

License

Stars

Watchers

Forks

Packages

No packages published