Load external JS from bookmarklet?

2015 Update Content security policy will prevent this from working in many sites now. For example, the code below won’t work on Facebook. 2008 answer Use a bookmarklet that creates a script tag which includes your external JS. As a sample: javascript:(function(){document.body.appendChild(document.createElement(‘script’)).src=”https://stackoverflow.com/questions/106425/** your external file URL here **”;})();

Log4Net config in external file does not work

Do you have the following attribute in your AssemblyInfo.cs file: [assembly: log4net.Config.XmlConfigurator(ConfigFile = “Log4Net.config”, Watch = true)] and code like this at the start of each class that requires logging functionality: private static readonly ILog log = LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); I have a blog post containing this and other info here.

Call external JS file based on “media screen” value

You can’t do that directly using Javascript <script> tags. Media queries are used in linked CSS files or inline CSS styles. A basic example: <link rel=”stylesheet” media=”screen and (min-width: 900px)” href=”https://stackoverflow.com/questions/15823137/desktop.css”/> <link rel=”stylesheet” media=”screen and (min-width: 571px)” href=”tablet.css”/> <link rel=”stylesheet” media=”screen and (max-width: 570px)” href=”mobile.css”/> Or directly in your stylesheets: @media screen and (max-width: 599px) … Read more