also, the browser would have to support ActiveX controls or it would just would be a remake of the dsi browser (that doesn't support YouTubebg
)
Offline
This probably won't be a fully-functional browser ( I'm not going to program Flash, Java, and all that stuff into Scratch which is already slow at loading normal pages ). So lets stick with the basics. HTML.
Offline
Bump. How do I make Panther load a webpage?
Offline
Okay, it currently contains
import image $String$ from web
stamp text $String$ at x: $Number$ y:$Number$ font $String$ size $Number$ color $Color$
$String$ contains $String$
set cursor to $String$
All can be found in the library
Offline
I was actually thinking of doing this myself.
Offline
Reading the pages is no problem, the main problems are
1) Text stamping struggles to match the size of the page
2) newlines aren't automatically created with text stamping
3) Some (a lot of) PNG images don't display properly when imported by Panther.
If anyone actually wants my early start on the project, you're welcome to download it here so long as you keep it open source and for all to develop (I.E. add bits but keep sharing!)
Last edited by sparks (2011-09-14 12:30:13)
Offline
It keeps complaining about ascii character 216 not normally being used in code.
Offline
sparks wrote:
That is odd... It seems to dislike .com sites and gives a syntax error. .net is fine. This doesn't happen in my personal copy of Panther (Which I'll admit I edited a little).
It doesn't work at all for me.
Offline
sparks wrote:
That is odd... It seems to dislike .com sites and gives a syntax error. .net is fine. This doesn't happen in my personal copy of Panther (Which I'll admit I edited a little).
Interesting thing .. oh btw png stuff .. is it converting all the alpha color to closest solid color ? (if yes then u are very close to an IE6 bug)
now coming to JS & CSS
I read the source code(bits) of googles V8 (to make me understand JS better and also to curiousity lol) and i think i can help writing a JS parser module for Panther Browser
,
CSS looks very very hard to me as CSS 2 & 3 has lots of stuff taht even Scratch cannot implement -_- . We might be able to do CSS 1 though but that too after a long long code idea!
Last edited by fanofcena (2011-09-15 14:22:42)
Offline
I think this would have to go the way of the phone browser, displaying content without necessarily displaying formatting. The current image importing system in Panther (A block by MathWizz) fails to import a fairly large number of PNG images (it usually imports them as blank, unreadable PNG's)
| img newC |
(t1 asLowercase endsWith: '.gif') ifTrue: [
img _ (GIFReadWriter new setStream: (HTTPSocket httpGet: t1)) nextImage.]
ifFalse: [
(t1 asLowercase endsWith: '.png') ifTrue: [
img _ (PNGReadWriter createAFormFrom: (HTTPSocket httpGet: t1) contents) first]
ifFalse: [
img _ HTTPSocket httpJpeg: t1]].
newC _ ImageMedia new form: img; mediaName: (self unusedMediaNameFromBaseName: (self defaultImageMedia mediaName)).
self addMediaItem: newC.It also cannot deal with JPG, only JPEG for some reason.
Also, may I say, the IE glitch with PNG's is a pain in the bum, I had to replace almost all my PNG images on my website with GIF and BMP just to please that difficult child Internet Explorer
Offline
sparks wrote:
Also, may I say, the IE glitch with PNG's is a pain in the bum, I had to replace almost all my PNG images on my website with GIF and BMP just to please that difficult child Internet Explorer
![]()
Oh yeah i am dwnloading win 8 atm lets see how much there Banner of "HTML 5" metro applet holds in this :S ..
But seriously IE sux lol
i use CSS 3 and hence i put his on my website
if($.browser.ie){
alert("Website under compitablity mode , Your browser is not sufficiently powerful to support the features , kindly upgrade to a better browser if possible");
Run_Plain();
}else{
do_epicness();
}
Offline
fanofcena wrote:
sparks wrote:
Also, may I say, the IE glitch with PNG's is a pain in the bum, I had to replace almost all my PNG images on my website with GIF and BMP just to please that difficult child Internet Explorer
![]()
Oh yeah i am dwnloading win 8 atm lets see how much there Banner of "HTML 5" metro applet holds in this :S ..
But seriously IE sux lol
i use CSS 3 and hence i put his on my website
if($.browser.ie){
alert("Website under compitablity mode , Your browser is not sufficiently powerful to support the features , kindly upgrade to a better browser if possible");
Run_Plain();
}else{
do_epicness();
}
I think I prefer this method of using javascript:
<!--[if IE]>
<script type="text/javascript">
document.write("You're using IE so this website is wasted on you, As a result of this you get no website!");
</script>
<[endif]--!>Offline
well for example you can do:
<!--[if IE]>
<link rel="stylesheet" type="text/css" href="style.css">
<[endif]--!>
And it will only display the stylesheet in IE
Offline
Magnie wrote:
I find putting my name into your topic a very funny way to get me to read this... xD
Anyway, I might be able to do a few things, but I'm not the most fluent in CSS or Javascript. I'll be able to do a few things with pure HTML web pages, but any more than that will be a different story. Though I'll see what I can do.Do you have a basic project already set up?
Edit: Also, how would we download the images?
Download the images: (Contents of file at URL []) Reporter block in Panther.
I am VERY fluent at JS, HTML, CSS.
A little fluent at PHP, but how would we send data TO the server?
(Maybe tell Panther to connect to it with those URL parameter things(I forgot what they are called) so that the PHP script would think we connected)


Offline
cocolover76 wrote:
Magnie wrote:
I find putting my name into your topic a very funny way to get me to read this... xD
Anyway, I might be able to do a few things, but I'm not the most fluent in CSS or Javascript. I'll be able to do a few things with pure HTML web pages, but any more than that will be a different story. Though I'll see what I can do.Do you have a basic project already set up?
Edit: Also, how would we download the images?Download the images: (Contents of file at URL []) Reporter block in Panther.
I am VERY fluent at JS, HTML, CSS.
A little fluent at PHP, but how would we send data TO the server?
(Maybe tell Panther to connect to it with those URL parameter things(I forgot what they are called) so that the PHP script would think we connected)
Download the images:Panther comes with a sample project that renders pictures with the pen.


Offline
I also have an idea for part of HTML:
<!--[if IE 7]>
<!--[if IE 8]>
<!--[if scratch]-->
You are using Scratch
<!--[endif]-->
<![endif]-->
<![endif]-->
It uses 1 that cancels out the other, so that other browsers don't display it.


Offline
sparks wrote:
I have a basic project going, I'll post a download later. Importing images is very cool and possible thanks to MathWizz who made the following block:
get web image $String$Code:
| img newC | (t1 asLowercase endsWith: '.gif') ifTrue: [ img _ (GIFReadWriter new setStream: (HTTPSocket httpGet: t1)) nextImage.] ifFalse: [ (t1 asLowercase endsWith: '.png') ifTrue: [ img _ (PNGReadWriter createAFormFrom: (HTTPSocket httpGet: t1) contents) first] ifFalse: [ img _ HTTPSocket httpJpeg: t1]]. newC _ ImageMedia new form: img; mediaName: (self unusedMediaNameFromBaseName: (self defaultImageMedia mediaName)). self addMediaItem: newC.Very useful
It does absolutely fail to import the pngs for project thumbnails on the Scratch site for some odd reason...
Most pics that change very often are .php, with JFIF at the beginning of the file somewhere to make the browser think it's an image.


Offline
jeeze you would have to implement every html statement but yeah that would be cool
Offline
midnightleopard wrote:
jeeze you would have to implement every html statement but yeah that would be cool
Yeah, that's the only problem with this project, adding all those features.
Offline