Created
August 27, 2012 13:36
-
-
Save jongyeol/3488464 to your computer and use it in GitHub Desktop.
for legacy permalink of articles (tumblr)
This file contains hidden or 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
// for legacy permalink of articles (tumblr) | |
// https://gist.github.com/3488464 | |
var tistory_to_tumblr = {112:30221404745,153:30221405199,162:30221406213, | |
165:30221406682,169:30221407456,190:30221408123,198:30221408582,206:30221409411, | |
222:30221410069,226:30221410948,228:30221411862,232:30221412510,234:30221413236, | |
235:30221413938,239:30221414577,241:30221415162,246:30221416063,247:30221416688, | |
250:30221417632,254:30221418221,261:30221419015,262:30221419621,267:30221420423, | |
269:30221421190,270:30221421891,276:30221422892,277:30221424099,278:30221424871, | |
279:30221425577,281:30221426200,282:30221427117,283:30221427848,289:30221428614, | |
295:30221429399,296:30221430111,298:30221430855,299:30221431506,300:30221432110, | |
302:30221432887,304:30221433757,305:30221434376,306:30221434983,307:30221436027, | |
308:30221436777,309:30221437334,314:30221437920,320:30221438664,327:30221439111, | |
328:30221440085,331:30221440673,332:30221441273,338:30221442422,340:30221443009, | |
341:30221443605,343:30221444328,349:30221445389,350:30221446099,358:30221447048, | |
359:30221447649,360:30221448252,367:30221449173,368:30221450057,369:30221450844, | |
371:30221451448,373:30221452145,374:30221452879,375:30221453685,377:30221454655, | |
378:30221455615,379:30221456430,381:30221457036,382:30221458023,383:30221458920, | |
385:30221459562,386:30221460223,387:30221461023,389:30221461630,390:30221462410, | |
392:30221463095,393:30221463497,394:30221464192,397:30221464790,399:30221465542, | |
400:30221466135,401:30221466731,402:30221467425,403:30221468032,405:30221468599, | |
406:30221469227,409:30221470154,411:30221470747,412:30221471512,413:30221471946, | |
414:30221472550,416:30221473627,417:30221474517,424:30221475113,425:30221475729, | |
426:30221476295,428:30221477092,429:30221477902,430:30221478701,433:30221479275, | |
434:30221480008,435:30221480587,436:30221481568,437:30221482373,438:30221483043, | |
439:30221483761,440:30221484341,442:30221484894,444:30221485672,445:30221486303, | |
450:30221486890,455:30221487972,457:30221488646,459:30221489223,460:30221489974, | |
461:30221490917,462:30221491575,463:30221492133,464:30221492996,465:30221493755, | |
466:30221494342,471:30221495006,472:30221495766,473:30221496401,476:30221497234, | |
477:30221497845,480:30221498475,482:30221499081,483:30221499744,484:30221500331, | |
485:30221501070,487:30221501711,488:30221502322,489:30221503063,490:30221503834, | |
491:30221504441,492:30221504985,493:30221506004,494:30221506750,495:30221507385, | |
496:30221508204,497:30221508813,499:30221509395,500:30221510174,501:30221510961, | |
502:30221511694,503:30221512500,504:30221513068,505:30221513794,506:30221514728, | |
507:30221515362}; | |
var wordpress_to_tumblr = {25:30221404745,30:30221405199,43:30221406213, | |
45:30221406682,47:30221407456,55:30221408123,65:30221408582,70:30221409411, | |
74:30221410069,79:30221410948,81:30221411862,87:30221412510,89:30221413236, | |
91:30221413938,111:30221414577,113:30221415162,116:30221416063,119:30221416688, | |
121:30221417632,125:30221418221,139:30221419015,140:30221419621,145:30221420423, | |
150:30221421190,151:30221421891,160:30221422892,162:30221424099,163:30221424871, | |
165:30221425577,166:30221426200,167:30221427117,168:30221427848,173:30221428614, | |
181:30221429399,182:30221430111,185:30221430855,186:30221431506,187:30221432110, | |
189:30221432887,190:30221433757,191:30221434376,192:30221434983,193:30221436027, | |
226:30221436777,227:30221437334,231:30221437920,238:30221438664,245:30221439111, | |
247:30221440085,253:30221440673,254:30221441273,260:30221442422,262:30221443009, | |
263:30221443605,264:30221444328,269:30221445389,284:30221446099,290:30221447048, | |
306:30221447649,307:30221448252,312:30221449173,313:30221450057,315:30221450844, | |
317:30221451448,319:30221452145,322:30221452879,323:30221453685,327:30221454655, | |
328:30221455615,332:30221456430,333:30221457036,334:30221458023,336:30221458920, | |
337:30221459562,338:30221460223,339:30221461023,340:30221461630,341:30221462410, | |
347:30221463095,348:30221463497,349:30221464192,353:30221464790,354:30221465542, | |
355:30221466135,356:30221466731,357:30221467425,358:30221468032,360:30221468599, | |
361:30221469227,362:30221470154,363:30221470747,364:30221471512,365:30221471946, | |
366:30221472550,368:30221473627,369:30221474517,377:30221475113,378:30221475729, | |
379:30221476295,381:30221477092,383:30221477902,384:30221478701,386:30221479275, | |
387:30221480008,388:30221480587,390:30221481568,392:30221482373,396:30221483043, | |
397:30221483761,398:30221484341,399:30221484894,400:30221485672,401:30221486303, | |
406:30221486890,408:30221487972,411:30221488646,414:30221489223,415:30221489974, | |
416:30221490917,418:30221491575,419:30221492133,420:30221492996,421:30221493755, | |
422:30221494342,428:30221495006,429:30221495766,431:30221496401,435:30221497234, | |
436:30221497845,440:30221498475,441:30221499081,442:30221499744,443:30221500331, | |
444:30221501070,446:30221501711,448:30221502322,449:30221503063,450:30221503834, | |
453:30221504441,455:30221504985,456:30221506004,457:30221506750,458:30221507385, | |
459:30221508204,463:30221508813,464:30221509395,465:30221510174,466:30221510961, | |
470:30221511694,471:30221512500,472:30221513068,473:30221513794,474:30221514728, | |
475:30221515362,528:30221516104,538:30221516737,547:30221517788,551:30221518562, | |
577:30221519228,585:30221519791}; | |
var tistorylink = window.location.pathname.match(/^\/([0-9]+)$/); | |
var wordpresslink = window.location.pathname.match(/^\/post\/([0-9]+)$/); | |
if (tistorylink) { | |
var article_no = Number(tistorylink[1]); | |
if (article_no <= 508 && tistory_to_tumblr[article_no]) | |
window.location = "/post/" + tistory_to_tumblr[article_no]; | |
} else if (wordpresslink) { | |
var article_no = Number(wordpresslink[1]); | |
if (article_no <= 585 && wordpress_to_tumblr[article_no]) | |
window.location = "/post/" + wordpress_to_tumblr[article_no]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment