Prevent firebug from manipulating DOM - dom

Is there a way to prevent programs like Firebug from manipulating the DOM of a page.
I've noticed that you can simply delete thing like ads that are paid for by other companies.
Is there a way for the page to stop it?

Can you prevent me from switching to another channel on TV, or from cutting away ads from my newspaper? No. Same thing with my PC.
In other words: the page is in the client's computer, and the client can do whatever they wish with it.

The simple answer is no.
The long answer: if you construct your ads from many unrelated absolute-positioned elements, it will be next to impossible to delete them.
The right answer: if your ads are so obtrusive that you have to worry about people deleting them, then you should rethink your business.

Firebug runs in the context of the displayed page, and since pages' scripts can alter dom and delete things, firebug can too.
However you can run some javascript to check if the ad is deleted, and restore it, but still that javascript can be stopped/disabled with firebug.

Related

Make user submitted data into a link

I'm a bit of a newbie and I'm scratching my head over this one.
Here is what I want to do:
On my web page, I have an input form and a submit button.
I want users to input data to the form, click submit, and go to a page that uses the data the user input as the url.
For example, if a user inputs 'bob' and clicks submit, they would go to '../bob.html'.
Is this possible?
Thanks!
I think the task you have taken on cannot be solved with HTML, though I am not sure about HTML5. This sort of thing is generally done using Java/JSP, C#/ASP, Perl CGI, or any of a number of other options. Whatever you use will almost certainly involve a bit of programming effort and require a server running at your site.
I could be wrong, so try looking at http://www.w3schools.com/tags for a relatively complete list of HTML options. It also occurs to me that you might be able to do this client side using JavaScript. Once again you might try W3schools for some helpful tutorials or just a quick query in you favorite search engine will bring up lots of stuff to get you started. One problem with JavaScript is that many people turn it off in their browsers for security reasons.
Good luck.

OwnCloud enhance core features with App (eg. user registration)

I started looking into OwnCloud app development to add some capabilities I would like to my server. To me it seems like Apps can't modify anything like the Login page or User Management page. Is this the case?
I want to build a user registration app and would love to integrate it into the user management page (if not and it has to exist as its own app page not a big deal). The one big problem I see so far is not being able to add a "Register" link to the login page. I could just go in and add it to the source manually, but I would like to keep the App self contained so others can use it too.
If this is not possible to do in an App I may just need to modify the core application and then see if they will accept my feature addition in a pull request.
Thanks to anyone who can shed some light on this for me. I don't want to waste my time trying to figure out how to do it with an App on the platform if it wont be doable.
After a lot of digging around I did figure out a way to do this.
In the App's app.php file, you can force a script to be loaded if the plugin is enabled:
$api->addScript('script_name'); // without .js
In that script jQuery can be used to add the elements to the page where you need them.
This was a good solution for me since I only needed to add a single button to the login page. I can see this being a bad idea if you want to make vast modifications. At that point you might as well just create a separate page that you have full control over.

iPhone SDK: Ideas on how to implement a help facility for application

We we wondering what are some ways developers have added a help function to their apps. What are some techniques people have used?
One way we were thinking of is to us UIWebView to display a HTML file with help instructions.
Thoughts appreciated.
I'm using UIWebView right now which pretty much contains all the help in a single page, along with some JQuery things to display popups, etc. But I like the way iCab Mobile (et al.) are doing things which is a sectioned UITableView with each row a separate topic or section within their overall help information (complete with icons...) then in their bundle they have each section in its own html file, organized by localization.
Another thing in my queue for the next release is to provide a dynamic "News" view. The rough idea is as follows... I have on my server a file or CGI where I can place small bits of news I'd like to push out to users. On startup, my app checks for network availability and if present, start a thread to see if anything has changed on the server since last updating the News data. If changes present, post an alert letting user know, and asking if they'd like to read it now. At that point, the latest news is already downloaded and cached, so they can simply read it later if they want, and I won't post anymore alerts until the server file changes again. (And one could add a preference/setting to disable these alerts.)
I'm thinking this would be a good way to let people know that some nasty bug is known and fixed and an update is sitting in the queue, solicit beta testers, promote upcoming features or other apps, etc. I can see where constant alerts everytime I've got something new to promote would get annoying, so having a setting to disable them means the user never has to read them unless they want to. Although some kind of override to warn of recently discovered/fixed bugs seems sensible.
FWIW, the author of Mover+/Mover has just started doing a similar thing, though I think Emanuele is perhaps only showing one Notelet at a time, whereas I envision a bit more of a history (shown in UIWebView) until I decide to age stuff off the bottom of the stack.
I'm using a scroll/page view to show several images containing small notes. Each image then tells the user about the more advanced functions on a specific part of the app.
In my opinion the help should only contain information that isn't a 100% relevant for the use of the application. It should be things the advanced user should use to make more use of the app. It should contain gold for the power users. The "basics" should be so obvious that no help would ever be needed. If that's not the case, I think, you've failed as a developer on the iPhone platform.
(Here's a screen shot from my demo app)
I'm currently creating a fairly complicated app. I'm thinking of doing help as a semi-transparent overlay - help in text form is hard to swallow for users; it's much more helpful to just point at stuff and say "this does that".

What are some good ways of keeping content from being copied to other sites

I understand that no matter what I do, someone will be able to copy it. However I can still make them work hard for it. What are some good ways of making data not easily copied using php compatible coding.
--- Added ----
The data is a listing of results for certain local sports events. We send people out to collect the information, post the information, make corrections and such. However a competing website takes our results (I know they are directly copying them) and never updates them which causes people to call our office and complain.
---- Answer for my Use ----
I picked one of them, however I am going to use multiple of your answers. I am going to add my link in a using the copy pasta trick. I am going to put fake hidden text into it. I am also going to do the fake hidden text trick with different versions of the div tag that are fake (making it even harder to scrape or to do something like copy to textpad and replace it real easily), and I am going to talk to a lawyer as well about legal recourse and what I can do to make it illegal for them to copy the data (such as creative bios or something cool like that). Thanks for your help.
Joe, you can't really make them work really hard to get your data. It's essentially just a single request to any of your pages. Your best option is to explicitly state that you own the rights to all of your content, and that any infringement on that ownership will lead to legal ramifications*.
* Not a lawyer
Your data will be copied to every computer that requests the page and it will stay there until the person clears their cache. To answer your question, you can't.
What you can do is create a CSS style such as:
.copy-pasta { display: none; }
And then throughout your content, add something like this:
<p class="copy-pasta">Content provided via [your website here]</p>
This will increase your page rank when copy-pasters blatantly steal your content, meaning you will show up first in search results.
Place some <div style="display: inline; position: absolute; overflow: hidden; width: 0px">useless words</div> in the text. It won't display for reading, but if someone copy and paste... "WOW where it came from WTF!! *CRY*"
How about putting links to your site in with the displayed data? No big fanfare, but just suggest that the for the most up to date figures, they can go to the real website that publishes them.
Most of what you try will only work for a time. Until you exceed their laziness factor. (What they're doing suggests a high laziness factor.)
Laws don't protect publicly available data, but you may be able to protect the packaging and presentation.
Programs used to copy out data look for the data using pattern-matching. You could 'decorate' your data with randomly-chosen tags (like one row would have a span tag surrounding it, the next row a div, etc...). Just a thought.
Clarification:
With screen-scraper at least, the user of the program specifies what HTML comes before the data they want, and what HTML comes after it. You can make it more difficult for them to automatically retrieve the data.
Why are people calling your office to complain if the data is on a competing website? If they have a domain name that is similar enough to yours that people are confusing the two of you or if they've put something on their site that makes it look like you've endorsed them, then you've got them for trademark infringement.
Disable the context menu is a start.
$(document).bind('contextmenu', function(e)
{
return false;
});
Or
<body oncontextmenu="return false;">
Forbidding people to get data is almost impossible. You can mess up your tags and make the code really dirty and hard to parse... but it's not really enough. You could also generate a big image with the data in it, this would be painful to parse! ... but you don't want to do that.
Because you said...
However a competing website takes our
results (I know they are directly
copying them) and never updates them
which causes people to call our office
and complain.
... my call would be to take this the other way and create an API allowing people to get your content in a way that YOU designed.
Also if they are just shamelessly stealing your data and they don't have the right to do it, consider a legal option.
Another option is to use PHP code to generate images from the site's HTML. You would use the images to display the content, instead of HTML which can be easily copied out. Example code is here, and I bet you could find more code to do this by Googling:
http://www.acasystems.com/en/web-thumb-activex/faq-php-convert-html-to-image.htm
Try Copyscape it wont prevent your content from being copied, but it will make finding the copies very easy.
You may encrypt the data on the page, and have javascript obfuscated decoding routine that will decode it for you viewers. You may switch keys and encryption algorithms from time to time. Same javascript should disable ability to select text and/or copy it to prevent manual copy-pasting.
They won't be able to copy manually and their scraper would have to be able to run javascript to get the data.
Caveat is that the data won't be visible for Google, but if data is rather numeric it might not be such a big harm.
If they scrape automatically and very often you may also try to pinpoint their IP by observing most active IP-s on your site and serve them fake data.
Please don't use lawyers, that's hitting below the belt.
use swf to display your data, just like other online books

what is the default pop up replacement now?

I know pop ups are not good and should be avoided if possible but is that really true that now, whenever i think of using a pop up, i should always be considering other options? Are there any exceptions? And the last question is: what is the default replacement for pop ups?
You can use any javascript based dialog. Look for example at jQuery UI Dialog
The "Web2.0" pop-up might be a lightbox. I hope these are just a passing fad, because they are kind of annoying (a lot like pop-ups).
http://en.wikipedia.org/wiki/Lightbox_(JavaScript)
Banners, like you get at the top of Stack Overflow to tell you about badges, comments, see the FAQ if you're a new user are my favorite. They don't really get in the way and can link to the main content.
It depends on what you are trying to accomplish. Pop-ups are completely acceptable in certain contexts. The aversion to pop-ups arose from having pop-up foisted on users in the form of advertisements. I think that pop-ups are still a valid device in the correct case.
My rule of thumb is to not make any decisions for the user that they can make themselves. This typically includes opening a pop-up since they could right-click and choose "open link in new window" if they so desired.
Do you want to capture of a piece of user input without allowing any further interaction? A modal dialog is your friend.
there are cases where you want to offer a bit of useful info or a quick reference that doesn't necessitate closing off the rest of the web page or navigating to a different location. This could be addressed using some javascript and floating div's but many times a pop-up will do what you want without being obtrusive to a user.
I tend to read resources from the likes of 37 signals and UIE to keep up with the best ways to enhance user experience without alienating a user.