Skip to content

Instantly share code, notes, and snippets.

@LukasReschke
Created June 23, 2013 15:17
Show Gist options
  • Save LukasReschke/5845385 to your computer and use it in GitHub Desktop.
Save LukasReschke/5845385 to your computer and use it in GitHub Desktop.
Load a JS file in ownCloud for not logged-in users
<?php
if(!\OC_User::isLoggedIn()) {
\OCP\Util::addscript('loginscript', 'login');
}
<?xml version="1.0"?>
<info>
<id>loginscript</id>
<name>Login Script</name>
<description>Loads an additional JS file for not logged in users</description>
<licence>AGPL</licence>
<require>4.93</require>
</info>
alert("blah");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment