This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Friends with names containing this strings will be removed from screenshots: | |
var usersToHide=["pegnuin","Name2","Name3"]; | |
// Games with names containing this strings will be removed from screenshots: | |
var gamesToHide=["Civilization","Spiel2","Spiel3"]; | |
function hideScreenshot(hrefMatcher, contentMatcher) { | |
jQuery("#blotter_content").find("div.blotter_screenshot:has(div.blotter_author_block:has(a[href*='"+hrefMatcher+"']:contains('"+contentMatcher+"')))").hide(); | |
} | |
function hideScreenshots() { | |
jQuery.each(usersToHide, function(i,v) { | |
hideScreenshot("/id/",v); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ConfigureServices | |
var connectionStringProvider = new ConnectionStringProvider<WebApiDbContext>("ConnectionString"); | |
services.AddSingleton(connectionStringProvider); | |
services.AddDbContext<WebApiDbContext>((s, o) => o.UseSqlite( | |
s.GetService<ConnectionStringProvider<WebApiDbContext>>().ConnectionString)); | |
// Singleton provider for connection string (or other DbContextOptions) | |
public class ConnectionStringProvider<TContext> where TContext : DbContext |