How to Hide The Source - hide

Okay, I am not sure if this question belongs here.
Either way, I am interested to know how to show one source on Developer ➛ Page Source (Firefox) and totally another when CTRL+A on the page ➛ Inspect Element. I have seen it is done on some of the sites I have visited, for instance: http://www.therigsofficial.com/
Thank you. I truly appreciate all help.

It is impossible to hide your javascript completley, but you can make it harder to read by obfuscating.
Try this tool JavaScript Obfuscator. Pro. It can work on your case.

Related

Get information from "inspector" on a web page

A really noob web programmer here!
So I need to build a program that, as I give it a link it inspect the page (like the right click and "inspect element" option that we have in Firefox) and get the infromation from it exported. I wanna be able to filter what kind of information that I am having and to put them all together in a hash or somethink like this.
Does anyone have a tip? What language should I go for? There is any plugin or lib that already does that? I just want a direction so I can get started with this project! Thanks!

Asciidoctor navigation bar

I see that asciidoctor.org itself has a navigation (top) bar. I'm guessing that the website was written using asciidoctor source files. Either way, how do I add a navigation bar using asciidoctor?
Update
This is possibly the wrong question to ask. Perhaps the right way to go is to use awestruct, Middleman, or Jekyll. Advice/suggestions are welcome.
Yes, the source is asciidoctor, but the site is using awestruct for the structure around the content. If you're looking at doing the same kind of thing, we recommend using some other site generation tool for the structure around the content.
Of course if you really want to do this in asciidoctor, you could. You'd need to create your own theme and craft the header that way, but it isn't really recommended because it ties your output to a medium.

How to make Google Chrome extension sample work?

Recently I decided to write a very simple Google Chrome extension. All it's going to do is to hide some DOM-elements from the web-page using JavaScript when user presses the extension's button.
Since I knew nothing about Chrome extensions, I started reading tutorials, and I came across this Google's sample: A browser action with no icon that makes the page red
This sample is really close to what I want to make. The problem is that I can't make it work. Whenever I load the extension in Chrome, I can see the button of this extension, but when I press it - nothing happens. Sample doesn't work, probably I should know something I don't know yet.
And before you started asking me:
Yes, I tried restarting the browser;
I use the newest version of Chrome.
Thanks for help.
If you open up the sample zip... find backgrond.js... edit.
Find the line that says:
null, {code:"document.body.style.background='red !important'"});
and remove the "!important". so it should read:
null, {code:"document.body.style.background='red'"});
That is it. just save and reload the extension, should work (unless the page has an !important flag set to the background).
I am afraid I don't know why the "!important" tag doesn't work but I have never been able to get it to work in an extension. Hopefully someone else here will be able to give an explanation and maybe a work around.
I think I can help bring some clarification to the "!important" override attribute causing the extension to break. Though I am not 100% I believe that this attribute is not allowed for issues involving security complications. I have a link to another SO thread that may help clarify this as well.
My CSS is not getting injected through my content script
I'm assuming from reading this article that you must either use the !important override when content scripts specified in the manifest file. Otherwise if the css is being injected !important is not required. Again not 100% on this.

how to add editing live website on the website?

if you have ever worked with IPB Forums you will know that you can make changes to your site in the ACP (admin control panel) well what im wanting to do is make something like the one that they use for the "look & feel" part of the forums where you can make changes to the entire website from the one small area i want to add that to my ACP on my main site to make it easier to make changes.
yes i already own a copy of IPB its v3.2.3 if it makes any difference
i appreciate any and all help
Look into adding a "edit in place" function somewhere in your website/forum. Check out:
http://www.appelsiini.net/projects/jeditable
As long as you understand super basic mySQL, PHP, and heard of jQuery/know how to add jQuery plugins to your code, then you are set!
Here is their (link provided above's) demo page:
http://www.appelsiini.net/projects/jeditable/default.html

Is it possible to provide Code highlighting on sites.google.com websites?

Is it possible to do Code Syntax highlighting on sites.google.com websites like the way we do it on Blogger.com or Wordpress.com?
Unfortunately there is until now no support for syntax highlighting within Google Sites. As a workaround you could use http://tohtml.com/ and enter your code there and copy the colored output (not the HTML) directly into your Google Sites page.
This works perfectly, as long as you don't need to edit large pieces of the code regularly.
I have tried creating a gadget myself with Google Code Prettify, and there were a few issues.
One is that classes aren't supported, so you will have to follow what Stack Overflow is doing to prettify.
http://www.codingthewheel.com/archives/syntax-highlighting-stackoverflow-google-prettify
The other problem I faced was the interaction between the iframe and the parent frame. You will notice that there is a domain permission problem, and so you will be unable to access the parent.document from your iframe.
This should save some people a few hours of hacky testing.
Yes, you can!
Just select the desired text, and go to "Formatting" -> "Code" OR "Block Code"
You can insert gadgets into Google Sites pages. You could create a gadget that did syntax highlighting using any number of open source javascript syntax highlighters.
Not an ideal solution but would get you what you want. Lemme know if you want further pointers.
I've found an alternative way.
If you use IntelliJ, just copy the code from the IntelliJ editor and paste it into your Google site text (not in html mode).
Works out-of-the-box!

Resources