This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// start a loop that's always running | |
while (1 == 1) | |
{ | |
// retrieve the next crawl target from a database or other persistent data store | |
string url = GetNextCrawlTarget(); | |
// check to see if this URL has already been indexed, if it has, check to see if it has changed since last crawl and needs to be re-crawled | |
if (URLAlreadyIndexed(url) == false && URLUpdatedSinceLastCrawl(url) == false) | |
{ | |
// crawl the url if there are links present within the document, extract them from the document and put them in a list of new potential crawl targets |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// disable copy paste into text area fields to prevent spammers from blowing up forms | |
jQuery(document).on('YourEventTypicallyDocumentReady', function() { | |
// disable keyboard paste | |
jQuery('YourFormFieldSelector').bind("cut copy paste", function(e) { | |
e.preventDefault(); | |
}); | |
// disable context menu to prevent right click pasting | |
jQuery('YourFormFieldSelector').bind("contextmenu", function(e) { |