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
/* | |
Protonmail does not allow to "mark all email as read". You can only do this page by page (50 at a time), but when you have thousands manualy going through each page is not possible. Here is my solution. | |
1. Open "All email" folder | |
2. Select "Unread" | |
3. Open browser developer tools (F12) | |
4. Paste this script. | |
5. If it does not work ask a friend developer to help you. | |
*/ |
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
# 1. Scan devices and let me choose | |
# 2. Scan books and let me choose or ALL | |
# 3. Store quotes in fille /quotes/BookName-DATE.odt append bookmarked page numbers at the end (v1) | |
import sqlite3, os, json, re | |
from ezodf2 import newdoc, opendoc, Paragraph, Heading, Sheet | |
from datetime import date | |
from operator import itemgetter | |
import random |
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
{ | |
"@context": "https://schema.org", | |
"@type": "Book", | |
"name": "The Unhoneymooners", | |
"url": "https://play.google.com/store/books/details/The_Unhoneymooners?id\\u003d3kaBDwAAQBAJ\\u0026hl\\u003den_US", | |
"workExample": { | |
"@type": "Book", | |
"bookFormat": "https://schema.org/EBook", | |
"abridged": "https://schema.org/False", | |
"isbn": "9781501128035", |
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
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
public function index($setting = null) { | |
$data = array(); | |
return $this->load->view('extension/module/age_restriction', $data); | |
} | |
} |
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
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
public function index($setting = null) { | |
$this->load->language('extension/module/age_restriction'); | |
if ($setting && $setting['status']) { | |
$show_modal = false; | |
$data = array(); | |
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
<!-- Modal --> | |
<div id="age-restriction-modal" class="modal fade" role="dialog"> | |
<div class="modal-dialog"> | |
<!-- Modal content--> | |
<div class="modal-content"> | |
<div class="modal-header"> | |
<h4 class="modal-title">{{modal_title}}</h4> | |
</div> | |
<div class="modal-body"> | |
<p>{{message}}</p> |
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
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
public function index($setting = null) { | |
if ($setting && $setting['status']) { | |
$data = array(); | |
$data['message'] = sprintf($setting['message'], $setting['age']); | |
$data['age'] = $setting['age']; |
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
var AGE_RESTRICTION_SESSION_KEY = '{{session_redirect}}'; | |
window.addEventListener('load', function(){ | |
$(document.getElementById('age-restriction-modal')).modal({backdrop: "static"}); | |
document.getElementById('age-negative').addEventListener('click', function(){ | |
window.location = "{{redirect_url}}"; | |
}); |
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
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
public function index($setting = null) { | |
$this->load->language('extension/module/age_restriction'); | |
if ($setting && $setting['status']) { | |
$show_modal = false; | |
$data = array(); | |
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
<?php | |
class ControllerExtensionModuleAgeRestriction extends Controller { | |
const DEFAULT_MODULE_SETTINGS = [ | |
'name' => 'Age Restriction (21)', | |
'message' => 'Are you %s and older?', | |
'age' => 21, | |
'redirect_url' => 'http://www.example.org', | |
'status' => 1 /* Enabled by default*/ | |
]; |
NewerOlder