This is the first paragraph.1
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
console.log( 'Start of content_script.js' ); | |
const script = document.createElement( 'script' ), | |
body = document.getElementsByTagName( 'body' )[ 0 ]; | |
script.src = browser.extension.getURL( 'injected_script.js' ); | |
body.appendChild( script ); | |
console.log( 'End of content_script.js' ); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<style type="text/css"> | |
h1, h2, h3 { | |
line-height: 1.2; | |
} | |
body { |
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
<?xml version="1.0"?> | |
<opml version="1.1"> | |
<head> | |
<title>Planet Freo</title> | |
<dateCreated>2015-01-14T00:48:45-08:00</dateCreated> | |
<dateModified>2015-01-14T00:48:45-08:00</dateModified> | |
</head> | |
<body> | |
<outline text="Freo Tribe" htmlUrl="http://fremantlesociety.org.au/blog" xmlUrl="http://fremantlesociety.org.au/blog/feed/atom/" isDown=""/> | |
<outline text="City of Fremantle Mayor Brad Pettitt's Blog" htmlUrl="http://cofremantle.wordpress.com" xmlUrl="http://cofremantle.wordpress.com/feed/atom/" isDown=""/> |
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
nositepath_temp_path = 'http://example.org'; | |
if (!Drupal.settings.site_path || Drupal.settings.site_path == '') { | |
Drupal.settings.site_path = variable_get('nositepath_site_path', nositepath_temp_path); | |
} | |
/** | |
* Implements hook_deviceready(). | |
*/ | |
function nositepath_deviceready() { |
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
$("form[method='post'] :input").change(function() { | |
window.onbeforeunload = function(){ | |
return true; // Prompt if any input has changed | |
}; | |
}); | |
$("form[method='post']").submit(function() { | |
window.onbeforeunload = null; // Only remove the prompt if it's the submit button | |
}); |
See also my Code Review question: Javascript conversion of datetime strings in PHP pages to user's timezone. Kudos to Aleksi Yrttiaho.
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
$().ready(function() { | |
// Save the current value of a select when it gains focus, to | |
// be used in case the value is changed. | |
$("table select").live('focus', function(){ | |
$(this).data('oldVal',$(this).val()); | |
}); | |
//After changing a value in any row, | |
$("table select").live('change',function() { |
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
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* | |
*/ | |
class Text extends Kohana_Text | |
{ | |
/** | |
* | |
* Apply the titlecase filter to a string: removing underscores, uppercasing |