Development
: K-Meleon Forum
K-Meleon development related discussions.
Goto:
Forum List
•
Message List
•
Search
•
Log In
Your Name:
Subject:
Help information
BBcode help
Smileys help
[quote=JamesD] [quote=deadlock] 1) Why did you pick 'new Date()' as an example? Is there any working injectJS command for 1.7a2? I guess it was disabled completely in that alpha. 2) What file extensions are you talking about? [/quote] I needed a date string when I thought I would have to do a macro for history in ver 1.7. I had experimented with obtaining a system date in KM 1.6.0 beta 2.4. I made all the following work there. I did not obtain a usable date in 1.7. [code] $_Snippet_Value = injectJS( "Date()"); alert( $_Snippet_Value, "datestring", INFO); $_Snippet_Date = injectJS( "var d = new Date(); function returnVar(d){return d;} returnVar(d);"); alert( $_Snippet_Date, "Date()", INFO); $_Snippet_Year = injectJS( "var d = new Date(); dm = d.getFullYear(); function returnVar(dm){return dm;} returnVar(dm);"); alert( $_Snippet_Year, "d.getFullYear()", INFO); $_Snippet_Month = injectJS( "var d = new Date(); dm = d.getMonth(); function returnVar(dm){return dm;} returnVar(dm);"); alert( $_Snippet_Month + 1, "d.getMonth() +1", INFO); $_Snippet_Day = injectJS( "var d = new Date(); dm = d.getDate(); function returnVar(dm){return dm;} returnVar(dm);"); alert( $_Snippet_Day, "d.getDate()", INFO); $_Snippet_WeekDay = injectJS( "var d = new Date(); dm = d.getDay(); function returnVar(dm){return dm;} returnVar(dm);"); alert( $_Snippet_Day, "d.getDay()", INFO); $_Snippet_DateString = injectJS( "var d = new Date(); dm = d.toDateString(); function returnVar(dm){return dm;} returnVar(dm);"); alert( $_Snippet_DateString, "d.toDateString()", INFO); [/code] As for the file extension, I had a path to profilefolder plus History.ini. The ini file was written as as Hist17 without an extension. [code] $_Hist17_Path = getfolder(ProfileFolder)."\\History.ini"; [/code] and [code] iniwrite($_Hist17_DateTime, "1" , $_Hist17_HistURL_1, $_Hist17_Path); iniwrite($_Hist17_DateTime, "2" , $_Hist17_HistURL_2, $_Hist17_Path); iniwrite($_Hist17_DateTime, "3" , $_Hist17_HistURL_3, $_Hist17_Path); iniwrite($_Hist17_DateTime, "4" , $_Hist17_HistURL_4, $_Hist17_Path); iniwrite($_Hist17_DateTime, "5" , $_Hist17_HistURL_5, $_Hist17_Path); iniwrite($_Hist17_DateTime, "6" , $_Hist17_HistURL_6, $_Hist17_Path); [/code] Resulted in this file. Filename is 'Hist17'. [code] [] 1=http://www.myway.com/ 2=http://apnews.myway.com//article/20120328/D9TPFAM00.html 3=http://www.dailyrotation.com/index.php 4=http://thechive.com/category/girls/ 5=http://www.duke-energy.com/north-carolina/outages/current.asp 6=http://kmeleon.sourceforge.net/wiki/NewPreferences [/code] Notice that the place for a date is empty. It has only the [] symbols. I think I have run into other problems with the macro language in 1.7 but my memory is such that, right now, I know exactly what those were. Those items and history are why my default browser is still 1.6. I hope this info is useful.[/quote]
[Please Enable JavaScript]
K-Meleon forum is powered by
Phorum
.
Home/News
Screenshots
Download
Documentation
Resources
Get Involved
Forum
Bugs
Development