Skip to content

Instantly share code, notes, and snippets.

@iiic
iiic / Iptc.php
Created July 28, 2017 13:12
Nastavení IPTC atributů pro obrázky JPEG s využitím setterů
<?php
class Iptc {
private $meta;
const OBJECT_NAME = '2#005';
const EDIT_STATUS = '2#007';
const PRIORITY = '2#010';
const CATEGORY = '2#015';
const SUPPLEMENTAL_CATEGORY = '2#020';
@iiic
iiic / fid-remove.js
Last active May 23, 2017 07:53 — forked from milo/fid-remove.js
Flash message _fid parameter remove.
(function (w) {
'use strict';
const TIMEOUT = 2000;
const FID_QSA = '_fid=';
function removeFid() {
var url = w.location.search.toString();
var fidPosition = url.indexOf(FID_QSA);
if (w.history && w.history.replaceState && fidPosition !== -1) {
var repairedUrl = url.substr(0, fidPosition) + url.substr(fidPosition + 10);
while ((repairedUrl.substr(repairedUrl.length-1) === '?') || (repairedUrl.substr(repairedUrl.length-1) === '&')) {