K-Meleon
KMeleonWiki > Resources > MacroLibrary > KmmW3C
Submitted by: kko
Notes:
This macro integrates some of the W3C's Validation Services.
Open your User Macro Folder (Edit > Configuration > User-Defined Macros) or your Macro Folder
(Edit > Configuration > Macros) and create the following text files:
# K-Meleon Macros (http://kmeleon.sourceforge.net/wiki/index.php?id=MacroLanguage) # ---------- W3C Validation Services ------------------------------------------------------------------------------- # # Dependencies : main.kmm (OpenURL), sendto.kmm (menus) # Resources : - # Preferences : - # # ------------------------------------------------------------------------------------------------------------------ W3C_ValidateMarkup{ menugrayed=(hostname($URL)==""); $OpenURL="http://validator.w3.org/check?uri=".$URL; &OpenURL_InNew; } W3C_ValidateStyle{ menugrayed=(hostname($URL)==""); $OpenURL="http://jigsaw.w3.org/css-validator/validator?uri=".$URL; &OpenURL_InNew; } # ----- PRIVATE _W3C_BuildMenu{ index($macroModules,";SendTo;")>-1?setmenu($_SendTo_Page,macro,"W3C &Markup Validator",W3C_ValidateMarkup):setmenu(DocumentOpenExternal,macro,"W3C &Markup Validator",W3C_ValidateMarkup); index($macroModules,";SendTo;")>-1?setmenu($_SendTo_Page,macro,"W3C &CSS Validator",W3C_ValidateStyle):setmenu(DocumentOpenExternal,macro,"W3C &CSS Validator",W3C_ValidateStyle); } $OnInit=$OnInit."_W3C_BuildMenu;"; # ------------------------------------------------------------------------------------------------------------------ $macroModules=$macroModules."W3C;";