Cookie Consent (Silk Tide Modification) 1.0.0

   (0 reviews)

About This File

This is a modification of the Cookie Consent javascript from

The original was trying to be too clever for my tastes with multiple font sizes and sliders for different screen sizes. It didn't look great on my desktop, tablet, phone. It would I've stripped it down to the bare minimum to reduce distraction. It just features a single line in body text.

The original version used an Amazon S3 address for the javascript and CSS which was OK but the Cache-Control / Expires headers are not present which wasn't great for PageSpeed/YSlow reports and caching. With this version you have to self-host the files. Of course if you use a CDN you can upload them there too.

Whether it complies with the EU cookie law as implemented in your country is for you to determine - this implementation is fine for the UK and common to a number of notable websites such as (it's what I modelled the banner and CSS on).

To use:

- Upload the js and css files to your host somewhere. 

- Add this code to your pages just before the </head> tag. Modify the text as required and adjust the url for the css. 


<!-- Begin Cookie Consent -->
<script type="text/javascript">
    window.cookieconsent_options = {"message":"This website uses cookies","dismiss":"Close","learnMore":"Find out more","link":"","theme":"//"};

<script type="text/javascript" src="//"></script>
<!-- End Cookie Consent -->


See the forum url for more details/discussion..

1 person likes this

User Feedback

You may only provide a review once you have downloaded the file.

There are no reviews to display.

  • Similar Content

    • rynow
      roma() - autoit Framework - (needed support)
      By rynow
      I´m using AutoIt for a long time not only to automate applications but to develop complex stand-alone applications. I am particularly annoyed by the fact that the logic in AutoIt is difficult to separate from the presentation and the standard GUI elements are very inflexible. If you want to create something more sophisticated, you have to use GDI and write many lines for simple effects or animations.
      With these thoughts in mind, I looked around for alternatives and unfortunately found nothing that corresponded to my ideas. Therefore, I have thought of a different solution. I have created this framework in order to separate the logic from the presentation and to use HTML & CSS in my GUI to the full extent.
      Goals of the Framework
      MVC development with AutoIt HTML & CSS GUI in AutoIt Better and more modern package system(UDF) like npm CLI support like Laravel Artisan faster and more structured application development roma() is strongly inspired by Laravel PHP Framework so Laravel users will notice many similarities.
      Unfortunately, I do not have much time for the project at the moment. So I thought to myself, I share it and ask you for support.
      The framework primarily serves for the development of stand-alone applications.
      All necessary settings are preconfigured. You can start immediately with the logic or the view All settings are in one place The logic(controller) and the presentation are clearly separated from each other Development with MVC structure You can develop the GUI in realTimer without restarting AutoIt GUI can be developed in HTML & CSS Any graphic & video integration is possible (.png, .gif etc.). Also everything that is possible in HTML5 and CSS3 JavaScript & Frameworks are supported Debug logs are created including console output It is possible to work with multiple languages All UDFs are contained in the framework. Reloading is not necessary The AutoIt UDFs are also included in the Framework. This ensures that it workds correctly for different Versions of AutoIt The framework also provides functions that are necessary for communication between AutoIt and HTML. For example, evaluation of form data (GET & POST) (documentation for this and examples follow.) I also developed a template engine. (Similar to Laravel Blade) The template engine supports if statements (would like to have help to make loops possible). In the Future I will publish a complete documentation of the template engine and examples. Almost finished is a database package. This makes communication with databases an absolute child's play. So that was it for once. If something else occurs to me, I will update the list. Small Example
      url: http://localhost:8080/welcome ;application.au3 ;----------------------------------------------------------------------------------------------/ ; Initial ;----------------------------------------------------------------------------------------------/ #include 'vendor\initial.au3' func _roma_routes() ;----------------------------------------------------------------------------------------------/ ; GET Request ;----------------------------------------------------------------------------------------------/ $route_get('welcome', 'welcome') endfunc ;roma\controller\welcome.au3 ;----------------------------------------------------------------------------------------------/ ; Welcome Controller ;----------------------------------------------------------------------------------------------/ func controller_welcome() Local $name = 'Eduard', $lastname = 'Tschernjaew' ;----------------------------------------------------------------------------------------------/ ; passed variable to view (Array are possible) ;----------------------------------------------------------------------------------------------/ $toView('name', $name) $toView('lastname', $lastname) ;----------------------------------------------------------------------------------------------/ ; Return a View ;----------------------------------------------------------------------------------------------/ return $VIEW('welcome') endfunc <html> <head> <title>roma() - Template Test</title> </head> <body> <h1>Hello {{ $name }} {{ $lastname }}</h1> </body> </html>  
      The framework is under the Open-Source license.
      git clone or download the ZIP. 
      [ ] Loop Funktion in Template.au3
      [ ] CLI module like Laravel Artisan
      [ ] Solution approaches, how the framework can be optimally compiled, so that in the compiled state all files are available.
      [ ] Framework Tests & Bugfixes
      roma() is still in development. Documentation and application examples will soon be available. I am looking forward to any Contributing.
      Thanks for Feedback and Contributing
    • Chimp
      how to capture some events from a javascript (custom) object?
      By Chimp
      Hi to all, in this script I'm using a Javascript library called VIS to display data on a timeline. All is performed within a browser control embedded in the AutoIt GUI, and the AutoIt script should interact with what is going on in the browser control.
      what I'm stuck on is on finding a way to get notified in the AutoIt script on some events fired from that javascript library.
      When I use the ObjEvent()  to get notified about events fired by html elements from the html page, all works ok...
      I'm stuck instead on how to receive notifications from events fired by a javascript (custom?) object. The DataSet object.
      in very short:
      To add, edit or remove Items on the Timeline, first a DataSet is created and bound to the Timeline, then all variations performed on the DataSet will be automatically visualized in the form of Items located on the Timeline. All variations on the DataSet will also fire events. (use the button to create new items from autoit, or doubbleclick on the timeline to also create new items by the javascript library)
      now my problem is:
      since the DataSet is setted to fire events anytime some data in the DatSet is added and/or changed and/or deleted, i would like to be notified about such events in my AutoIt program, but I've not achieved the goal so far.
      In this example the events generated by the DataSet are notified within the HTML page and displayed within the browser control, but not forwarded to AutoIt.
      Any help to achieve this goal is higly appreciated.
      #include <GUIConstantsEx.au3> #include <MsgBoxConstants.au3> #include <string.au3> #include <array.au3> Global $g_idGUIEdit ; read html page from bottom of this script ; and write it to a file on disk CreateHtmlPage() Example() Exit Func Example() Local $hGUIMain = GUICreate("Event Test", 1000, 600) $g_idGUIEdit = GUICtrlCreateEdit("", 500, 405, 490, 175) GUICtrlSetFont(-1, 9, 400, -1, 'Courier New') GUICtrlCreateLabel("Below are some Browser events 'captured' from the above web page by AutoIt", 500, 385, 990, 20) Local $idGUIExit = GUICtrlCreateButton(" Close and exit", 5, 580, 990, 15) Local $hButton1 = GUICtrlCreateButton("Add an Item to timeline", 10, 400, 150, 40) GUISetState() ;Show GUI ; We prepare the Internet Explorer as our test subject Global $oIE = ObjCreate("Shell.Explorer.2") $hIE = GUICtrlCreateObj($oIE, 5, 5, 990, 380) ; <- embedd $oIE in the AutoIt GUI ; load our web page, javascript and css in the browser ToolTip("...downloading javascript, please wait") $oIE.navigate('file:///' & @ScriptDir & '\Page.html') Sleep(1000) ; Give it some time to load the web page ToolTip("") Do ; wait for document Sleep(250) $oDocument = $oIE.document Until IsObj($oDocument) ; ; $ohJS is a reference to the javascript Global Obj ; ------------------------------------------------- Global $ohJS = $oIE.document.parentwindow.JSglobal ; --- Setup catch of events --- ; ; HTMLDocumentEvents2 interface (catch OnClick, OnMouseOver, .... etc Global $oEventObject = ObjEvent($oDocument, "IEEvent2_", "HTMLDocumentEvents2") ; OK, this events are catched ; Attempt to catch events fired by the DataSet. ; items is the DataSet obj created in the Browser ; Global $oEventObject = ObjEvent($ohJS.items, "OnDataSet_") ; ???? how to catch events from the DataSet <---- ????? ; ----------------------------- ; Loop until the user exits. While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE, $idGUIExit ExitLoop Case $hButton1 ; add a job to the timeline (a simple example just to test) ; to generate a unique ID I use the following: @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC Local $result = $ohJS.eval("items.add([{id: " & @YEAR & @MON & @MDAY & @HOUR & @MIN & @SEC & @MSEC & ", content: '<b>item 4</b> Added at " & @HOUR & ":" & @MIN & ":" & @SEC & " ', start: '2014-01-19'}]);") ConsoleWrite("DataSet now contains " & $ohJS.items.length & " Items" & @CRLF) EndSwitch WEnd ; the end $oEventObject.Stop ; Tell IE we don't want to receive events. $oEventObject = 0 ; Kill the Event Object $oIE = 0 ; Remove IE from memory (not really necessary). GUIDelete($hGUIMain) ; Remove GUI EndFunc ;==>Example ; --- event management zone --- ; A few Internet Explorer Event Functions ; below function are fired by events occurred in the browser Volatile Func IEEvent2_onClick($oEvent) ConsolePrint("mouse click: " & $oEvent.clientX & ',' & $oEvent.clientY & ' on ' & $oEvent.srcElement.NodeName & ' - ' & $oEvent.srcElement.ID) EndFunc ;==>IEEvent2_onClick Volatile Func IEEvent2_onDblClick($oEvent) ConsolePrint("mouse DoubleClick: @" & $oEvent.clientX & ',' & $oEvent.clientY) EndFunc ;==>IEEvent2_onDblClick Volatile Func OnDataSet_add($oEvent) ConsolePrint("!!!! event from DataSet " & IsObj($oEvent)) ; type EndFunc ;==>OnDataSet_add Func ConsolePrint($sMsg) Local Const $iMaxLines = 9 ; keep last 12 lines only $sMsg = @HOUR & ':' & @MIN & ':' & @SEC & ':' & @MSEC & @TAB & $sMsg & @CRLF $sMsg = StringReplace(GUICtrlRead($g_idGUIEdit) & $sMsg, @CR, @CR) If @extended > $iMaxLines Then ; more than $iMaxLines $sMsg = StringMid($sMsg, StringInStr($sMsg, @CR, 0, -1 * $iMaxLines) + 2) EndIf GUICtrlSetData($g_idGUIEdit, $sMsg) EndFunc ;==>ConsolePrint Func CreateHtmlPage() Local $sStart = @LF & "#cs;HTML" Local $sEnd = "#ce;HTML" & @CR Local $aArray = _StringBetween(FileRead(@ScriptFullPath), $sStart, $sEnd) Local $sPage = @ScriptDir & '\Page.html' Local $hFile = FileOpen($sPage, 2) ; $FO_OVERWRITE (2) = Write mode (erase previous contents) FileWrite($hFile, $aArray[0]) FileFlush($hFile) FileClose($hFile) EndFunc ;==>CreateHtmlPage #cs;HTML <!DOCTYPE HTML> <html> <head> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <script type="text/javascript"> var JSglobal = (1,eval)("this"); </script> <style type="text/css"> body, html { font-family: arial, sans-serif; font-size: 11pt; } </style> <script src=""></script> <link href="" rel="stylesheet" type="text/css" /> </head> <body> <div id="visualization" style="border-width:3px; border-color:yellow; border-style:double;"></div> <p></p> <div id="log"></div> <script type="text/javascript"> // DOM element where the Timeline will be attached var container = document.getElementById('visualization'); // Create an empty DataSet (allows two way data-binding) var items = new vis.DataSet({type: { start: 'ISODate', end: 'ISODate', notes: '' }}); // items.addEventListener('click',resetElements,true); // add items to the DataSet items.add([ {id: 1, content: 'item 1 <b>start</b>', start: '2014-01-23'}, {id: 2, content: 'item 2', start: '2014-01-18 00:00', end: '2014-01-18 23:59'}, {id: 3, content: 'item 3', start: '2014-01-21'}, {id: 5, content: 'item 5', start: '2014-01-28', type:'point'}, {id: 6, content: 'item 6', start: '2014-01-26'} ]); // Configuration for the Timeline var options = {orientation: 'top', editable: { add: true, remove: true, updateTime: true, updateGroup: true } }; // Create a Timeline var timeline = new vis.Timeline(container, items, options); // turn events on timeline.on('rangechange', function (properties) { logEvent('rangechange', properties); }); timeline.on('rangechanged', function (properties) { logEvent('rangechanged', properties); }); timeline.on('select', function (properties) { logEvent('select', properties); }); items.on('*', function (event, properties) { logEvent(event, properties); }); function logEvent(event, properties) { var log = document.getElementById('log'); var msg = document.createElement('div'); msg.innerHTML = 'event=' + JSON.stringify(event) + ', ' + 'properties=' + JSON.stringify(properties); log.firstChild ? log.insertBefore(msg, log.firstChild) : log.appendChild(msg); } </script> </body> </html> #ce;HTML ;  
    • scintilla4evr
      ChakraCore UDF - executing JavaScript in AutoIt
      By scintilla4evr
      Microsoft Edge, the new browser released with Windows 10, uses Chakra as its JavaScript engine. In January, Microsoft released ChakraCore - the open source version of the engine that can be used in other apps.
      So, how about using it in AutoIt? I tried 2 times to create ChakraCore UDF, and I succeeded.
      So here it is - the ChakraCore UDF.
      Executing JavaScript from AutoIt (obviously) Passing data from AutoIt to JavaScript Calling AutoIt functions from JavaScript ChakraCore UDF
      Have fun!
    • scintilla4evr
      ChakraCore UDF
      By scintilla4evr
      A basic UDF enabling JavaScript execution using Microsoft's ChakraCore engine.
    • genius257
      Is it possible to throw an error in a ScriptControl object, via AutoIt
      By genius257
      First of all I've been searching on the forum, and while there's been done something like this with:
      I could not find any solution to my predicament.
      Is it possible to throw an error in a ScriptControl object, via AutoIt?
      I have a script, where AutoIt calls ScriptControl:JavaScript which in turn calls AutoIt.
      However i would like to be able to make AutoIt invoke an exception within ScriptControl, if the called functionality fails.
      Here's some code for reference:
      #AutoIt3Wrapper_Run_AU3Check=n #include-once #include "AutoitObject.au3" #include <WinAPIDiag.au3> $oJS = ObjCreate("ScriptControl") $oJS.Language = "JScript" $oJS.TimeOut = 0; A value of 0 means that the ScriptControl will monitor the execution of the script and will trigger the Timeout event if it determines that the script is hung. _AutoItObject_Startup() $oAutoIt = _AutoItObject_Create() _AutoItObject_AddMethod($oAutoIt, "Execute", "_Execute", False) $oJS.AddObject("AutoIt", $oAutoIt, True) OnAutoItExitRegister("_CleanUp") $_AutoItError = ObjEvent("AutoIt.Error", "_AutoItError") Func _CleanUp() ConsoleWrite("Cleaning up..."&@CRLF) $oJS = 0 $oAutoIt = 0 _AutoItObject_Shutdown() EndFunc Func _Execute($oSelf, $sString) $vReturn = Execute($sString) If @error<>0 Then Return $oJS.Eval("throw new SyntaxError();"); Does invoke exception, but not within the try/catch Return $vReturn EndFunc Func _AutoItError($oError) $oError2 = $oJS.Error ConsoleWrite( _ "Column: " & $oError2.Column & @CRLF & _ "Description: " & $oError2.Description & @CRLF & _ "HelpContext: " & $oError2.HelpContext & @CRLF & _ "HelpFile: " & $oError2.HelpFile & @CRLF & _ "Line: " & $oError2.Line & @CRLF & _ "Number: " & $oError2.Number & @CRLF & _ "Source: " & $oError2.Source & @CRLF & _ "Text: " & $oError2.Text & @CRLF _ ) $oError2.Clear() EndFunc $oJS.Eval("(function(){"& _ "try{"& _ "AutoIt.Execute('MsgBox(0,\'\', \'a\')');"& _ "AutoIt.Execute('a.b');/*error should occur here*/"& _ "AutoIt.Execute('MsgBox(0,\'\', \'b\')');"& _ "}catch(e){"& _ "AutoIt.Execute('ConsoleWrite(\'Error\'&@CRLF)');"& _ "}"& _ "})()")