<?php
/*
Plugin Name: Post editor enhancer for WordPress
Plugin URI: http://rudd-o.com/projects/post-editor-enhancer/
Description: Lets you 'full-screen' the post/page editor with one click, and makes previews full-height and width
Version: 0.1.0
Author: Manuel Amador (Rudd-O)
Author URI: http://rudd-o.com/
*/


function enlarger_style() { ?>
<style type="text/css">
#preview {
	padding-left: 0px;
	padding-right: 0px;
	margin-left: 0px;
	margin-right: 0px;
	border-left: none;
	border-right: none;
}
#preview iframe {
/* 	width: 99%; */
	border: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
}
</style>
<?php
}

function enlarger_js() { ?>
<script type="text/javascript" language="javascript" src="<?php print get_settings('siteurl') . "/wp-content/plugins/" . dirname(plugin_basename(__FILE__)) . '/post-editor-enhancer.js' ; ?>"></script>
<?php
}

if (strstr($_SERVER["SCRIPT_NAME"],"post.php") === false && strstr($_SERVER["SCRIPT_NAME"],"page-new.php") === false) { }
else {
	add_action("admin_footer","enlarger_js");
	add_action("admin_head","enlarger_style");
}

?>