» February 27th, 2010
How to Hide Android WebView Highlight Border (or change it’s color)
Here's one that had me at a loss for a long time that I just figured out. You can easily remove the highlight border (the border that comes up when an element is focused) or change it's color in a WebView with CSS! The WebKit-specific property "-webkit-tap-highlight-color" is what you're looking for.
The following line will disable it on a page completely:
1 2 3 | * { -webkit-tap-highlight-color: rgba(0, 0, 0, 0); } |
rgba() is just like rgb(), but it takes a 4th parameter for opacity. It's my belief that this would probably work for iPhone WebView's as well, since both Chrome and Safari are based off of WebKit.
6 comments
filed in: Code, How To's
» February 23rd, 2010
Windows 7 Icons Download
Looking to use Windows 7 icons in your applications or extensions? Download the following file to conveniently access them.
Download Windows 7 Icons Zip File (8.91 MB)
post a comment
filed in: Downloads
» February 22nd, 2010
PHP RSS Parser – RSS Reader Class for PHP
Just had to create a quick RSS parser for PHP and thought I'd post my solution. The implementation and class follows.
<?php
$rss = new RSSReader('http://news.google.com/?output=rss');
while ($rss -> hasNext())
print_r($rss -> next());
?>
<?php
class RSSReader {
var $xml = null;
var $pos = 0;
var $count = 0;
function __construct($feed_url) {
$this -> load_url($feed_url);
}
function load_url($feed_url) {
$this -> load_string(file_get_contents($feed_url));
}
function load_string($feed_string) {
$this -> xml = simplexml_load_string(str_replace('content:encoded', 'content_encoded', $feed_string));
$this -> pos = 0;
$this -> count = count($this -> xml -> channel -> item);
}
function get_title() {
return $this -> xml -> channel -> title;
}
function get_link() {
return $this -> xml -> channel -> link;
}
function get_pubdate() {
return $this -> xml -> channel -> pubdate;
}
function hasNext() {
return $this -> count > $this -> pos;
}
function next() {
$obj = $this -> xml -> channel -> item[$this -> pos++];
return array(
'title' => (string) $obj -> title,
'link' => (string) $obj -> link,
'description' => (string) $obj -> description,
'content' => (string) $obj -> content_encoded,
'pubDate' => strtotime($obj -> pubDate),
);
}
}
?>
2 comments
filed in: Code
![[del.icio.us]](http://www.randomtools.net/wp-content/plugins/bookmarkify/delicious.png)
![[Digg]](http://www.randomtools.net/wp-content/plugins/bookmarkify/digg.png)
![[Facebook]](http://www.randomtools.net/wp-content/plugins/bookmarkify/facebook.png)
![[Google]](http://www.randomtools.net/wp-content/plugins/bookmarkify/google.png)
![[Reddit]](http://www.randomtools.net/wp-content/plugins/bookmarkify/reddit.png)
![[Slashdot]](http://www.randomtools.net/wp-content/plugins/bookmarkify/slashdot.png)
![[StumbleUpon]](http://www.randomtools.net/wp-content/plugins/bookmarkify/stumbleupon.png)